com.aurellem.capture.audio
Class AudioSendRenderer

java.lang.Object
  extended by com.jme3.audio.lwjgl.LwjglAudioRenderer
      extended by com.aurellem.capture.audio.AudioSendRenderer
All Implemented Interfaces:
MultiListener, com.jme3.audio.AudioRenderer, java.lang.Runnable

public class AudioSendRenderer
extends com.jme3.audio.lwjgl.LwjglAudioRenderer
implements MultiListener


Field Summary
 java.util.Vector<com.jme3.audio.Listener> listeners
          Keeps track of all the listeners which have been registered so far.
static int MIN_FRAMERATE
           
 java.util.HashMap<com.jme3.audio.Listener,SoundProcessor> soundProcessorMap
          Each listener (including the main LWJGL listener) can be registered with a SoundProcessor, which this Renderer will call whenever there is new audio data to be processed.
 
Constructor Summary
AudioSendRenderer()
           
 
Method Summary
 void addListener(com.jme3.audio.Listener l)
          Create a new slave context on the recorder device which will render all the sounds in the main LWJGL context with respect to this listener.
 void cleanup()
           
 void dispatchAudio(float tpf)
           
 void initialize()
           
 void initInThread()
          Instead of taking whatever device is available on the system, this call creates the "Multiple Audio Send" device, which supports multiple listeners in a limited capacity.
 void registerSoundProcessor(com.jme3.audio.Listener l, SoundProcessor sp)
          Whenever new data is rendered in the perspective of this listener, this Renderer will send that data to the SoundProcessor of your choosing.
 void registerSoundProcessor(SoundProcessor sp)
          Registers a SoundProcessor for the main LWJGL context.
 void update(float tpf)
           
 void updateAllListeners()
           
 
Methods inherited from class com.jme3.audio.lwjgl.LwjglAudioRenderer
cleanupInThread, deleteAudioData, deleteFilter, pauseSource, playSource, playSourceInstance, run, setEnvironment, setListener, stopSource, updateInThread, updateListenerParam, updateSourceParam
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

public java.util.Vector<com.jme3.audio.Listener> listeners
Keeps track of all the listeners which have been registered so far. The first element is null, which represents the zeroth LWJGL listener which is created automatically.


soundProcessorMap

public java.util.HashMap<com.jme3.audio.Listener,SoundProcessor> soundProcessorMap
Each listener (including the main LWJGL listener) can be registered with a SoundProcessor, which this Renderer will call whenever there is new audio data to be processed.


MIN_FRAMERATE

public static final int MIN_FRAMERATE
See Also:
Constant Field Values
Constructor Detail

AudioSendRenderer

public AudioSendRenderer()
Method Detail

initialize

public void initialize()
Specified by:
initialize in interface com.jme3.audio.AudioRenderer
Overrides:
initialize in class com.jme3.audio.lwjgl.LwjglAudioRenderer

addListener

public void addListener(com.jme3.audio.Listener l)
Create a new slave context on the recorder device which will render all the sounds in the main LWJGL context with respect to this listener.

Specified by:
addListener in interface MultiListener

registerSoundProcessor

public void registerSoundProcessor(com.jme3.audio.Listener l,
                                   SoundProcessor sp)
Whenever new data is rendered in the perspective of this listener, this Renderer will send that data to the SoundProcessor of your choosing.

Specified by:
registerSoundProcessor in interface MultiListener

registerSoundProcessor

public void registerSoundProcessor(SoundProcessor sp)
Registers a SoundProcessor for the main LWJGL context. IF all you want to do is record the sound you would normally hear in your application, then this is the only method you have to worry about.

Specified by:
registerSoundProcessor in interface MultiListener

initInThread

public void initInThread()
Instead of taking whatever device is available on the system, this call creates the "Multiple Audio Send" device, which supports multiple listeners in a limited capacity. For each listener, the device renders it not to the sound device, but instead to buffers which it makes available via JNI.

Overrides:
initInThread in class com.jme3.audio.lwjgl.LwjglAudioRenderer

cleanup

public void cleanup()
Specified by:
cleanup in interface com.jme3.audio.AudioRenderer
Overrides:
cleanup in class com.jme3.audio.lwjgl.LwjglAudioRenderer

updateAllListeners

public void updateAllListeners()

dispatchAudio

public void dispatchAudio(float tpf)

update

public void update(float tpf)
Specified by:
update in interface com.jme3.audio.AudioRenderer
Overrides:
update in class com.jme3.audio.lwjgl.LwjglAudioRenderer