uk.org.toot.audio.filter
Class AbstractFilter

java.lang.Object
  extended by uk.org.toot.audio.filter.AbstractFilter
All Implemented Interfaces:
Filter
Direct Known Subclasses:
BiQuadFilter, FIRFilter

public abstract class AbstractFilter
extends java.lang.Object
implements Filter


Nested Class Summary
 
Nested classes/interfaces inherited from interface uk.org.toot.audio.filter.Filter
Filter.State, Filter.Type
 
Constructor Summary
AbstractFilter(FilterSpecification spec)
           
 
Method Summary
 void clear()
          Clear the filter's states (i.e.
 void close()
          Close this Filter, release resources, deleteObservers etc.
abstract  void filter(float[] buffer, float[] mixBuffer, int length, int chan, boolean mix)
          Filter the source signal to the destination signal.
 uk.org.toot.audio.filter.FilterDesign getDesign()
           
 void open()
          Open this Filter, acquire resources, addObservers etc.
 void setSampleRate(int rate)
          Called when the sample rate changes.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFilter

public AbstractFilter(FilterSpecification spec)
Method Detail

open

public void open()
Description copied from interface: Filter
Open this Filter, acquire resources, addObservers etc.

Specified by:
open in interface Filter

close

public void close()
Description copied from interface: Filter
Close this Filter, release resources, deleteObservers etc.

Specified by:
close in interface Filter

getDesign

public uk.org.toot.audio.filter.FilterDesign getDesign()

filter

public abstract void filter(float[] buffer,
                            float[] mixBuffer,
                            int length,
                            int chan,
                            boolean mix)
Description copied from interface: Filter
Filter the source signal to the destination signal. If the source and dest are the same a simple in-place filter should result. If the source and destination are different the Filter should add (or subtract) a portion of the source to the destination. This portion should represent the contribution to an equaliser comprising multiple such filters.

Specified by:
filter in interface Filter
chan - permits the Filter to use different States for different logical filter channels.

clear

public void clear()
Description copied from interface: Filter
Clear the filter's states (i.e. the delay taps). This is to avoid glitches in non-contiguous filtering.

Specified by:
clear in interface Filter

setSampleRate

public void setSampleRate(int rate)
Description copied from interface: Filter
Called when the sample rate changes.

Specified by:
setSampleRate in interface Filter


Copyright © 2004, 2005, 2006, 2007 Steve Taylor. All Rights Reserved.