rlm@9: package com.aurellem.capture.audio; rlm@9: rlm@9: import java.nio.ByteBuffer; rlm@9: rlm@30: import javax.sound.sampled.AudioFormat; rlm@30: rlm@9: public interface SoundProcessor { rlm@9: rlm@39: /** rlm@65: * Called when the SoundProcessor is being destroyed, and there rlm@65: * are no more samples to process. This happens at the latest rlm@65: * when the Application is shutting down. rlm@39: */ rlm@39: void cleanup(); rlm@9: rlm@39: /** rlm@39: * rlm@39: * Called whenever there are new audio samples to process. The rlm@39: * audioSamples ByteBuffer contains 3D audio data rendered by rlm@39: * OpenAL. rlm@39: * rlm@39: * @param audioSamples a ByteBuffer containing processed audio rlm@39: * samples rlm@65: * @param numSamples the number of samples, in bytes, that are rlm@65: * valid rlm@39: * @param format the format of the audio samples in audioSamples rlm@39: */ rlm@39: void process(ByteBuffer audioSamples, int numSamples, AudioFormat format); rlm@9: rlm@9: }