public class ALAudioRenderer extends java.lang.Object implements AudioRenderer, java.lang.Runnable
Constructor and Description |
---|
ALAudioRenderer(AL al,
ALC alc,
EFX efx) |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Cleanup/destroy the audio system.
|
void |
deleteAudioData(AudioData ad) |
void |
deleteFilter(Filter filter) |
float |
getSourcePlaybackTime(AudioSource src) |
void |
initialize()
Initializes the renderer.
|
void |
pauseAll()
Pauses all Playing audio.
|
void |
pauseSource(AudioSource src) |
void |
playSource(AudioSource src) |
void |
playSourceInstance(AudioSource src) |
void |
resumeAll()
Resumes all audio paused by
AudioRenderer.pauseAll() . |
void |
run() |
void |
setEnvironment(Environment env)
Sets the environment, used for reverb effects.
|
void |
setListener(Listener listener) |
void |
stopSource(AudioSource src) |
void |
update(float tpf)
Update the audio system.
|
void |
updateInDecoderThread(float tpf) |
void |
updateInRenderThread(float tpf) |
void |
updateListenerParam(Listener listener,
ListenerParam param) |
void |
updateSourceParam(AudioSource src,
AudioParam param) |
public void initialize()
AudioRenderer
initialize
in interface AudioRenderer
public void run()
run
in interface java.lang.Runnable
public void cleanup()
AudioRenderer
cleanup
in interface AudioRenderer
public float getSourcePlaybackTime(AudioSource src)
getSourcePlaybackTime
in interface AudioRenderer
public void updateSourceParam(AudioSource src, AudioParam param)
updateSourceParam
in interface AudioRenderer
public void updateListenerParam(Listener listener, ListenerParam param)
updateListenerParam
in interface AudioRenderer
public void setEnvironment(Environment env)
AudioRenderer
setEnvironment
in interface AudioRenderer
env
- The environment to set.AudioNode.setReverbEnabled(boolean)
public void update(float tpf)
AudioRenderer
update
in interface AudioRenderer
tpf
- Time per frame.public void updateInRenderThread(float tpf)
public void updateInDecoderThread(float tpf)
public void setListener(Listener listener)
setListener
in interface AudioRenderer
listener
- The listener camera, all 3D sounds will be
oriented around the listener.public void pauseAll()
AudioRenderer
pauseAll
in interface AudioRenderer
public void resumeAll()
AudioRenderer
AudioRenderer.pauseAll()
.
To be used when the app is brought back to the foreground.resumeAll
in interface AudioRenderer
public void playSourceInstance(AudioSource src)
playSourceInstance
in interface AudioRenderer
public void playSource(AudioSource src)
playSource
in interface AudioRenderer
public void pauseSource(AudioSource src)
pauseSource
in interface AudioRenderer
public void stopSource(AudioSource src)
stopSource
in interface AudioRenderer
public void deleteFilter(Filter filter)
deleteFilter
in interface AudioRenderer
public void deleteAudioData(AudioData ad)
deleteAudioData
in interface AudioRenderer