Package 

Class AsynchronousAndroidAudio

  • 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.

    • Method Summary

      Modifier and Type Method Description
      void dispose() Kills the soundpool and all other resources
      Sound newSound(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