Class Sounds
java.lang.Object
de.gurkenlabs.litiengine.resources.ResourcesContainer<Sound>
de.gurkenlabs.litiengine.resources.Sounds
public final class Sounds
extends ResourcesContainer<Sound>Method Summary
Modifier and Type Method Description Soundload(SoundResource resource)Loads a sound from the specified XML resource.protected Soundload(java.net.URL resourceName)Loads the sound from the specified path and returns it.Methods inherited from class de.gurkenlabs.litiengine.resources.ResourcesContainer
add, add, addClearedListener, addContainerListener, clear, contains, contains, contains, count, get, get, get, get, get, get, get, getAlias, getAll, getAsync, getAsync, getResources, remove, remove, removeClearedListener, removeContainerListener, tryGet, tryGet
Method Details
load
Loads a sound from the specified XML resource.- Parameters:
resource- The XML resource that contains the sound as Base64 string.- Returns:
- The
Soundinstance loaded from the specified resource. - See Also:
Codec.decode(String)
load
Loads the sound from the specified path and returns it.- Specified by:
loadin classResourcesContainer<Sound>- Parameters:
resourceName- The path of the file to be loaded.(Can be relative or absolute)- Returns:
- The loaded Sound from the specified path.
- Throws:
java.lang.Exception
