public abstract class AbstractBufferedSoundBinaryOp extends AbstractBufferedSoundOp implements BufferedSoundBinaryOp
Constructor and Description |
---|
AbstractBufferedSoundBinaryOp() |
Modifier and Type | Method and Description |
---|---|
abstract void |
applyFilter(double[] source1,
double[] source2,
double[] destination)
Apply the filter (sample-by-sample).
|
void |
applyFilter(java.util.Iterator<double[]> source1,
java.util.Iterator<double[]> source2,
java.util.Iterator<double[]> destination)
Apply the filter to all of the channels.
|
BufferedSound |
filter(BufferedSound src1,
BufferedSound src2,
BufferedSound dest)
A two-source/one-destination filter.
|
createCompatibleDestinationSound
public abstract void applyFilter(double[] source1, double[] source2, double[] destination)
source1
- The signal from source1source2
- The signal from source2destination
- The destination signalspublic void applyFilter(java.util.Iterator<double[]> source1, java.util.Iterator<double[]> source2, java.util.Iterator<double[]> destination)
source1
- The signals from source1source2
- The signals from source2destination
- The destination signalspublic BufferedSound filter(BufferedSound src1, BufferedSound src2, BufferedSound dest) throws java.lang.IllegalArgumentException
filter
in interface BufferedSoundBinaryOp
src1
- One operand (i.e., one sound to operate on)src2
- The other operand (i.e., other sound to operate on)dest
- An empty sound to hold the result (or null)java.lang.IllegalArgumentException
- if the sounds don't match