net.jinx.audio
Interface Listener

All Known Implementing Classes:
AbstractListener, DefaultListener

public interface Listener

Listener represents any object that is responsible for setting OpenAL parameters and options for the listener. If you consider the point of view in a scene to be a camera, then this is the microphone. In most implementations of an audio system, only one Listener can be active at once, so any Listener after the first will probably be ignored. This is how AudioRenderer in the action library is implemented.

API Stability: Alpha; this is subject to change at any time.


Method Summary
 void deinit()
          Deinitializes this Listener, disposing of any resources it may be tying up.
 void init(net.java.games.joal.AL al, net.java.games.joal.ALC alc)
          Initializes this Listener, preparing it for use.
 void listen()
          Updates OpenAL with new data for this Listener.
 

Method Detail

init

void init(net.java.games.joal.AL al,
          net.java.games.joal.ALC alc)
Initializes this Listener, preparing it for use. If this Listener contains Audibles, then their init methods MUST be called first.

References to the al and alc objects should be stored for later; the listen() and deinit() methods will require them. It is also possible, but not likely that once deinit() has been called, this method will be called again with different AL and ALC objects.

If this Listener is already initialized and hasn't been deinitialized, then calls to this method should be ignored.

Parameters:
al - the AL object to use for audio rendering. If this is null, a NullPointerException should be thrown.
alc - the ALC object to use for audio rendering. If this is null, a NullPointerException should be thrown.

listen

void listen()
Updates OpenAL with new data for this Listener. In a properly designed system, this should be called on a regular basis.


deinit

void deinit()
Deinitializes this Listener, disposing of any resources it may be tying up. If this Listener contains Audibles, then their deinit methods should be called here.