ccs.audio.filters
Class DefaultFilterChain

java.lang.Object
  extended by ccs.audio.filters.DefaultFilterChain

public class DefaultFilterChain
extends java.lang.Object

Manages the (currently, fixed) chain of filters, which transform incoming sound samples before pushing them out to the playback system. Currently it only features a gain control, and is an elephant gun to shoot a gnat. The idea is that we have enough of a framework to add Cool Stuff later, if we decide to.


Field Summary
protected  java.util.List<ccs.audio.filters.AbstractAudioFilter> chain
           
 
Constructor Summary
DefaultFilterChain()
           
 
Method Summary
 void setLine(javax.sound.sampled.SourceDataLine destination)
          Notify the filters that the output line has changed; this probably means the sample format has changed too.
 void setMasterGain(float dB)
           
 void write(byte[] wad, int len)
          Write audio samples into the filter chain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

chain

protected java.util.List<ccs.audio.filters.AbstractAudioFilter> chain
Constructor Detail

DefaultFilterChain

public DefaultFilterChain()
Method Detail

setMasterGain

public void setMasterGain(float dB)

setLine

public final void setLine(javax.sound.sampled.SourceDataLine destination)
Notify the filters that the output line has changed; this probably means the sample format has changed too. If you override this, call it.

Parameters:
destination - The new output line.

write

public final void write(byte[] wad,
                        int len)
Write audio samples into the filter chain.