jass.generators
Class FilterContainerStereo

java.lang.Object
  extended by jass.engine.Out
      extended by jass.engine.InOut
          extended by jass.generators.FilterContainerStereo
All Implemented Interfaces:
Sink, Source

public class FilterContainerStereo
extends InOut

Filter UG. One input only. Processes input through filter.

Author:
Kees van den Doel (kvdoel@cs.ubc.ca)

Field Summary
 
Fields inherited from class jass.engine.InOut
sourceContainer, sourcePassivity, srcBuffers
 
Fields inherited from class jass.engine.Out
buf, bufferSize, bufOld, lock
 
Constructor Summary
FilterContainerStereo(float srate, int bufferSize, Filter f1, Filter f2)
          Create container around Filter.
 
Method Summary
 java.lang.Object addSource(Source s)
          Add source to Sink.
protected  void computeBuffer()
          Compute the next buffer and store in member float[] buf.
 void setFilters(Filter f1, Filter f2)
          SetFilter contained.
 
Methods inherited from class jass.engine.InOut
addSource, getBuffer, getSources, removeSource, resetTime
 
Methods inherited from class jass.engine.Out
clearBuffer, copyToOld, getBuffer, getBufferSize, getTime, peekAtBuffer, setBufferSize, setTime, setTimeAndNotify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterContainerStereo

public FilterContainerStereo(float srate,
                             int bufferSize,
                             Filter f1,
                             Filter f2)
Create container around Filter.

Parameters:
srate - sampling rate in Hertz.
bufferSize - Buffer size used for real-time rendering.
f - Filter contained.
Method Detail

addSource

public java.lang.Object addSource(Source s)
                           throws SinkIsFullException
Add source to Sink. Override to allow only one input.

Specified by:
addSource in interface Sink
Overrides:
addSource in class InOut
Parameters:
s - Source to add.
Returns:
object representing Source in Sink (may be null).
Throws:
SinkIsFullException

setFilters

public void setFilters(Filter f1,
                       Filter f2)
SetFilter contained.

Parameters:
f - Filter contained.

computeBuffer

protected void computeBuffer()
Compute the next buffer and store in member float[] buf.

Specified by:
computeBuffer in class Out