APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.badlogic.gdx.assets.loaders

public Class MusicLoader

extends AsynchronousAssetLoader<Music, MusicLoader.MusicParameter>
Class Inheritance
Imports
com.badlogic.gdx.Gdx, com.badlogic.gdx.assets.AssetDescriptor, .AssetLoaderParameters, .AssetManager, com.badlogic.gdx.audio.Music, com.badlogic.gdx.files.FileHandle, com.badlogic.gdx.utils.Array

AssetLoader for Music instances. The Music instance is loaded synchronously.
Author
mzechner

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private Music

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Array<AssetDescriptor<T>>
getDependencies(String fileName, FileHandle file, MusicLoader.MusicParameter parameter)

Implements abstract com.badlogic.gdx.assets.loaders.AssetLoader.getDependencies.

Returns the assets this asset requires to be loaded first.

protected Music

Returns:

the currently loaded Music, otherwise null if no Music has been loaded yet.
getLoadedMusic
()

Returns the Music instance currently loaded by this MusicLoader.

public void
loadAsync(AssetManager manager, String fileName, FileHandle file, MusicLoader.MusicParameter parameter)

Implements abstract com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader.loadAsync.

Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.

public Music
loadSync(AssetManager manager, String fileName, FileHandle file, MusicLoader.MusicParameter parameter)

Implements abstract com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader.loadSync.

Loads the OpenGL part of the asset.

Inherited from com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader:
unloadAsync

Field Detail

musicback to summary
private Music music

Constructor Detail

MusicLoaderback to summary
public MusicLoader(FileHandleResolver resolver)

Method Detail

getDependenciesback to summary
public Array<AssetDescriptor<T>> getDependencies(String fileName, FileHandle file, MusicLoader.MusicParameter parameter)

Implements abstract com.badlogic.gdx.assets.loaders.AssetLoader.getDependencies.

Doc from com.badlogic.gdx.assets.loaders.AssetLoader.getDependencies.

Returns the assets this asset requires to be loaded first. This method may be called on a thread other than the GL thread.

Annotations
@Override
getLoadedMusicback to summary
protected Music getLoadedMusic()

Returns the Music instance currently loaded by this MusicLoader.

Returns:Music

the currently loaded Music, otherwise null if no Music has been loaded yet.

loadAsyncback to summary
public void loadAsync(AssetManager manager, String fileName, FileHandle file, MusicLoader.MusicParameter parameter)

Implements abstract com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader.loadAsync.

Doc from com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader.loadAsync.

Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.

Annotations
@Override
loadSyncback to summary
public Music loadSync(AssetManager manager, String fileName, FileHandle file, MusicLoader.MusicParameter parameter)

Implements abstract com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader.loadSync.

Doc from com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader.loadSync.

Loads the OpenGL part of the asset.

Annotations
@Override
com.badlogic.gdx.assets.loaders back to summary

public Class MusicLoader.MusicParameter

extends AssetLoaderParameters<Music>
Class Inheritance

Field Summary

Inherited from com.badlogic.gdx.assets.AssetLoaderParameters:
loadedCallback

Constructor Summary

AccessConstructor and Description
public

Constructor Detail

MusicParameterback to summary
public MusicParameter()