-
- All Implemented Interfaces:
-
com.badlogic.gdx.Audio,com.badlogic.gdx.backends.android.AndroidAudio,com.badlogic.gdx.utils.Disposable
public class AsynchronousAndroidAudio extends DefaultAndroidAudio
A performance oriented implementation of the AndroidAudio interface. Sounds are played on a separate thread. This avoids waiting for sound ids on methods that can potentially lock main thread for considerable amount of time, especially when playing several sounds at the same time. The limitation of this approach is that methods that require a sound id are not supported.
-
-
Constructor Summary
Constructors Constructor Description AsynchronousAndroidAudio(Context context, AndroidApplicationConfiguration config)
-
Method Summary
Modifier and Type Method Description voiddispose()Kills the soundpool and all other resources SoundnewSound(FileHandle file)-
Methods inherited from class com.badlogic.gdx.backends.android.DefaultAndroidAudio
getAvailableOutputDevices, newAudioDevice, newAudioRecorder, newMusic, newMusic, notifyMusicDisposed, pause, resume, switchOutputDevice -
Methods inherited from class com.badlogic.gdx.Audio
getAvailableOutputDevices, newAudioDevice, newAudioRecorder, newMusic, newSound, switchOutputDevice -
Methods inherited from class com.badlogic.gdx.utils.Disposable
dispose -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
AsynchronousAndroidAudio
AsynchronousAndroidAudio(Context context, AndroidApplicationConfiguration config)
-
-
-
-