public class AndroidMini2DxAudio extends java.lang.Object implements Mini2DxAudio
AndroidAudio
to support sound completion eventsModifier and Type | Field and Description |
---|---|
protected java.util.List<AndroidMini2DxMusic> |
musics |
Constructor and Description |
---|
AndroidMini2DxAudio(Context context,
AndroidApplicationConfiguration config) |
Modifier and Type | Method and Description |
---|---|
void |
addSoundCompletionListener(SoundCompletionListener listener)
Adds a
SoundCompletionListener to listen for sound effect completion events |
void |
appendRecentSoundId(long streamId) |
void |
dispose()
Kills the soundpool and all other resources
|
com.badlogic.gdx.audio.AudioDevice |
newAudioDevice(int samplingRate,
boolean isMono) |
com.badlogic.gdx.audio.AudioRecorder |
newAudioRecorder(int samplingRate,
boolean isMono) |
com.badlogic.gdx.audio.Music |
newMusic(java.io.FileDescriptor fd)
Creates a new Music instance from the provided FileDescriptor.
|
com.badlogic.gdx.audio.Music |
newMusic(com.badlogic.gdx.files.FileHandle file) |
com.badlogic.gdx.audio.Sound |
newSound(com.badlogic.gdx.files.FileHandle file) |
protected void |
pause() |
void |
removeSoundCompletionListener(SoundCompletionListener listener)
Removes a
SoundCompletionListener |
protected void |
resume() |
void |
update()
Updates the audio device and events
|
protected final java.util.List<AndroidMini2DxMusic> musics
public AndroidMini2DxAudio(Context context, AndroidApplicationConfiguration config)
public void update()
Mini2DxAudio
update
in interface Mini2DxAudio
public void appendRecentSoundId(long streamId)
public void addSoundCompletionListener(SoundCompletionListener listener)
Mini2DxAudio
SoundCompletionListener
to listen for sound effect completion eventsaddSoundCompletionListener
in interface Mini2DxAudio
listener
- The SoundCompletionListener
implementation to addpublic void removeSoundCompletionListener(SoundCompletionListener listener)
Mini2DxAudio
SoundCompletionListener
removeSoundCompletionListener
in interface Mini2DxAudio
listener
- The SoundCompletionListener
implementation to removeprotected void pause()
protected void resume()
public com.badlogic.gdx.audio.AudioDevice newAudioDevice(int samplingRate, boolean isMono)
newAudioDevice
in interface com.badlogic.gdx.Audio
public com.badlogic.gdx.audio.Music newMusic(com.badlogic.gdx.files.FileHandle file)
newMusic
in interface com.badlogic.gdx.Audio
public com.badlogic.gdx.audio.Music newMusic(java.io.FileDescriptor fd)
fd
- the FileDescriptor from which to create the MusicAudio.newMusic(FileHandle)
public com.badlogic.gdx.audio.Sound newSound(com.badlogic.gdx.files.FileHandle file)
newSound
in interface com.badlogic.gdx.Audio
public com.badlogic.gdx.audio.AudioRecorder newAudioRecorder(int samplingRate, boolean isMono)
newAudioRecorder
in interface com.badlogic.gdx.Audio
public void dispose()
dispose
in interface Mini2DxAudio