net.jinx.audio
Interface Audible

All Known Implementing Classes:
AbstractAudible, Buffer, TestAudible

public interface Audible

Audible represents something that makes a sound or affects sound in some way. Implementing Audible allows the creation of any audio effect that may be needed, since any AL or ALC commands can be used.

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


Method Summary
 void deinit()
          Deinitializes this Audible, 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 Audible, preparing it for use.
 void update()
          Updates OpenAL with new data for this Audible.
 

Method Detail

init

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

Any Source objects needed can be constructed here, or the Audible can build and handle it's own sources the OpenAL way.

References to the al and alc objects should be stored for later; the update() 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 Audible 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.

update

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


deinit

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