public class SoundLoader extends AsynchronousAssetLoader<Sound,SoundLoader.SoundParameter>
AssetLoader
to load Sound
instances.Modifier and Type | Class and Description |
---|---|
static class |
SoundLoader.SoundParameter |
Constructor and Description |
---|
SoundLoader(FileHandleResolver resolver) |
Modifier and Type | Method and Description |
---|---|
Array<AssetDescriptor> |
getDependencies(java.lang.String fileName,
FileHandle file,
SoundLoader.SoundParameter parameter)
Returns the assets this asset requires to be loaded first.
|
protected Sound |
getLoadedSound()
Returns the
Sound instance currently loaded by this
SoundLoader . |
void |
loadAsync(AssetManager manager,
java.lang.String fileName,
FileHandle file,
SoundLoader.SoundParameter parameter)
Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.
|
Sound |
loadSync(AssetManager manager,
java.lang.String fileName,
FileHandle file,
SoundLoader.SoundParameter parameter)
Loads the OpenGL part of the asset.
|
unloadAsync
resolve
public SoundLoader(FileHandleResolver resolver)
protected Sound getLoadedSound()
Sound
instance currently loaded by this
SoundLoader
.public void loadAsync(AssetManager manager, java.lang.String fileName, FileHandle file, SoundLoader.SoundParameter parameter)
AsynchronousAssetLoader
loadAsync
in class AsynchronousAssetLoader<Sound,SoundLoader.SoundParameter>
fileName
- the name of the asset to loadfile
- the resolved file to loadparameter
- the parameters to use for loading the assetpublic Sound loadSync(AssetManager manager, java.lang.String fileName, FileHandle file, SoundLoader.SoundParameter parameter)
AsynchronousAssetLoader
loadSync
in class AsynchronousAssetLoader<Sound,SoundLoader.SoundParameter>
file
- the resolved file to loadpublic Array<AssetDescriptor> getDependencies(java.lang.String fileName, FileHandle file, SoundLoader.SoundParameter parameter)
AssetLoader
getDependencies
in class AssetLoader<Sound,SoundLoader.SoundParameter>
fileName
- name of the asset to loadfile
- the resolved file to loadparameter
- parameters for loading the asset