net.jinx.audio
Class AbstractAudible

java.lang.Object
  extended by net.jinx.audio.AbstractAudible
All Implemented Interfaces:
Audible
Direct Known Subclasses:
Buffer, TestAudible

public abstract class AbstractAudible
extends java.lang.Object
implements Audible

Simple abstract Audible implementation that takes care of storing the AL and ALC objects from the init(AL, ALC) method for you. Both init and deinit are implemented, leaving only update().

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


Constructor Summary
AbstractAudible()
          Constructor; does nothing.
 
Method Summary
 void deinit()
          Deinitializes this AbstractAudible.
protected  net.java.games.joal.AL getAL()
          Provides the AL object from the init(AL, ALC) method.
protected  net.java.games.joal.ALC getALC()
          Provides the ALC object from the init(AL, ALC) method.
 void init(net.java.games.joal.AL al, net.java.games.joal.ALC alc)
          Stores the AL and ALC objects for later.
 boolean isInitialized()
          Provides a way to determine if this Audible is in an initialized state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.jinx.audio.Audible
update
 

Constructor Detail

AbstractAudible

public AbstractAudible()
Constructor; does nothing.

Method Detail

init

public void init(net.java.games.joal.AL al,
                 net.java.games.joal.ALC alc)
Stores the AL and ALC objects for later.

Specified by:
init in interface Audible
Parameters:
al - the AL object to use for audio rendering.
alc - the ALC object to use for audio rendering.
Throws:
java.lang.NullPointerException - if al or alc are null.

isInitialized

public boolean isInitialized()
Provides a way to determine if this Audible is in an initialized state.

Returns:
true if this Audible is in an initialized state.

getAL

protected net.java.games.joal.AL getAL()
Provides the AL object from the init(AL, ALC) method.

Returns:
the AL object.

getALC

protected net.java.games.joal.ALC getALC()
Provides the ALC object from the init(AL, ALC) method.

Returns:
the ALC object.

deinit

public void deinit()
Deinitializes this AbstractAudible.

Specified by:
deinit in interface Audible