com.aurellem.capture.audio
Class CompositeSoundProcessor

java.lang.Object
  extended by com.aurellem.capture.audio.CompositeSoundProcessor
All Implemented Interfaces:
SoundProcessor

public class CompositeSoundProcessor
extends java.lang.Object
implements SoundProcessor

Method of Combination for sound processors. This SoundProcessor will run the methods of each of its constituent SoundProcessors in the order in which it was constructed.

Author:
Robert McIntyre

Constructor Summary
CompositeSoundProcessor(SoundProcessor... processors)
           
 
Method Summary
 void cleanup()
          Called when the SoundProcessor is being destroyed, and there are no more samples to process.
 void process(java.nio.ByteBuffer audioSamples, int numSamples, javax.sound.sampled.AudioFormat format)
          Called whenever there are new audio samples to process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeSoundProcessor

public CompositeSoundProcessor(SoundProcessor... processors)
Method Detail

process

public void process(java.nio.ByteBuffer audioSamples,
                    int numSamples,
                    javax.sound.sampled.AudioFormat format)
Description copied from interface: SoundProcessor
Called whenever there are new audio samples to process. The audioSamples ByteBuffer contains 3D audio data rendered by OpenAL.

Specified by:
process in interface SoundProcessor
Parameters:
audioSamples - a ByteBuffer containing processed audio samples
numSamples - the number of samples, in bytes, that are valid
format - the format of the audio samples in audioSamples

cleanup

public void cleanup()
Description copied from interface: SoundProcessor
Called when the SoundProcessor is being destroyed, and there are no more samples to process. This happens at the latest when the Application is shutting down.

Specified by:
cleanup in interface SoundProcessor