auditory.sampled
Class AbstractBufferedSoundUnaryOp

java.lang.Object
  extended by auditory.sampled.AbstractBufferedSoundOp
      extended by auditory.sampled.AbstractBufferedSoundUnaryOp
All Implemented Interfaces:
BufferedSoundUnaryOp
Direct Known Subclasses:
FIRFilterOp, InvertOp, NoiseOp, ReverseOp, SpeedChangeOp

public abstract class AbstractBufferedSoundUnaryOp
extends AbstractBufferedSoundOp
implements BufferedSoundUnaryOp

An abstract class that implements the BufferedSoundUnaryOp interface. This method can be extended by classes that want to implement the BufferedSoundUnaryOp interface.

See Also:
"The Design and Implementation of Multimedia Software © 2011"

Constructor Summary
AbstractBufferedSoundUnaryOp()
           
 
Method Summary
abstract  void applyFilter(double[] source, double[] destination)
          Apply the filter (sample-by-sample).
 void applyFilter(java.util.Iterator<double[]> source, java.util.Iterator<double[]> destination)
          Apply the filter to all of the channels
 BufferedSound filter(BufferedSound src, BufferedSound dest)
          A two-source/one-destination filter.
 
Methods inherited from class auditory.sampled.AbstractBufferedSoundOp
checkArguments, createCompatibleDestinationSound
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBufferedSoundUnaryOp

public AbstractBufferedSoundUnaryOp()
Method Detail

applyFilter

public abstract void applyFilter(double[] source,
                                 double[] destination)
Apply the filter (sample-by-sample). This method must be implemented by concrete children

Parameters:
source - The signal from source
destination - The destination signals

applyFilter

public void applyFilter(java.util.Iterator<double[]> source,
                        java.util.Iterator<double[]> destination)
Apply the filter to all of the channels

Parameters:
source - The source signals
destination - The destination signals

filter

public BufferedSound filter(BufferedSound src,
                            BufferedSound dest)
A two-source/one-destination filter. If the destination is null, a BufferedSound with an appropriate AudioFormat and length is created and returned.

Specified by:
filter in interface BufferedSoundUnaryOp
Parameters:
src - The operand (i.e., the sound to operate on)
dest - An empty sound to hold the result (or null)


Design and Implementation of Multimedia Software, Jones and Bartlett Publishers