be.hogent.tarsos.sampled
Interface AudioProcessor

All Known Implementing Classes:
BlockingAudioPlayer, Spectrum

public interface AudioProcessor

AudioProcessors are responsible for actually doing digital signal processing. The interface is simple: a buffer with some floats and the same information in raw bytes.

Author:
Joren Six

Method Summary
 void processFull(float[] audioFloatBuffer, byte[] audioByteBuffer)
          Process the first (complete) buffer.
 void processingFinished()
          Notify the AudioProcessor that no more data is available and processing has finished.
 void processOverlapping(float[] audioFloatBuffer, byte[] audioByteBuffer)
          Do the actual signal processing on an overlapping buffer.
 

Method Detail

processFull

void processFull(float[] audioFloatBuffer,
                 byte[] audioByteBuffer)
Process the first (complete) buffer. Once the first complete buffer is processed the remaining buffers are overlapping buffers and processed using the processOverlapping method (Even if overlap is zero).

Parameters:
audioFloatBuffer - The buffer to process using the float data type.
audioByteBuffer - The buffer to process using raw bytes.

processOverlapping

void processOverlapping(float[] audioFloatBuffer,
                        byte[] audioByteBuffer)
Do the actual signal processing on an overlapping buffer. Once the first complete buffer is processed the remaining buffers are overlapping buffers and are processed using the processOverlapping method. Even if overlap is zero.

Parameters:
audioFloatBuffer - The buffer to process using the float data type.
audioByteBuffer - The buffer to process using raw bytes.

processingFinished

void processingFinished()
Notify the AudioProcessor that no more data is available and processing has finished. Can be used to deallocate resources or cleanup.