Package arc.assets.loaders
Class MusicLoader
java.lang.Object
arc.assets.loaders.AssetLoader<T,P>
arc.assets.loaders.AsynchronousAssetLoader<Music,MusicLoader.MusicParameter>
arc.assets.loaders.MusicLoader
AssetLoader
for Music
instances. The Music instance is loaded synchronously.-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetDependencies
(String fileName, Fi file, MusicLoader.MusicParameter parameter) Returns the assets this asset requires to be loaded first.protected Music
Returns theMusic
instance currently loaded by thisMusicLoader
.void
loadAsync
(AssetManager manager, String fileName, Fi file, MusicLoader.MusicParameter parameter) Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.loadSync
(AssetManager manager, String fileName, Fi file, MusicLoader.MusicParameter parameter) Loads the OpenGL part of the asset.Methods inherited from class arc.assets.loaders.AssetLoader
resolve
-
Constructor Details
-
MusicLoader
-
-
Method Details
-
getLoadedMusic
Returns theMusic
instance currently loaded by thisMusicLoader
. -
loadAsync
public void loadAsync(AssetManager manager, String fileName, Fi file, MusicLoader.MusicParameter parameter) Description copied from class:AsynchronousAssetLoader
Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.- Specified by:
loadAsync
in classAsynchronousAssetLoader<Music,
MusicLoader.MusicParameter> fileName
- the name of the asset to loadfile
- the resolved file to loadparameter
- the parameters to use for loading the asset
-
loadSync
public Music loadSync(AssetManager manager, String fileName, Fi file, MusicLoader.MusicParameter parameter) Description copied from class:AsynchronousAssetLoader
Loads the OpenGL part of the asset.- Specified by:
loadSync
in classAsynchronousAssetLoader<Music,
MusicLoader.MusicParameter> file
- the resolved file to load
-
getDependencies
public Seq<AssetDescriptor> getDependencies(String fileName, Fi file, MusicLoader.MusicParameter parameter) Description copied from class:AssetLoader
Returns the assets this asset requires to be loaded first. This method may be called on a thread other than the GL thread.- Specified by:
getDependencies
in classAssetLoader<Music,
MusicLoader.MusicParameter> - Parameters:
fileName
- name of the asset to loadfile
- the resolved file to loadparameter
- parameters for loading the asset- Returns:
- other assets that the asset depends on and need to be loaded first or null if there are no dependencies.
-