comparison src/com/aurellem/capture/audio/SoundProcessor.java @ 39:784a3f4e6202

updating capture-video
author Robert McIntyre <rlm@mit.edu>
date Thu, 03 Nov 2011 16:00:46 -0700
parents be37291c62b8
children 23e3df41db3c
comparison
equal deleted inserted replaced
38:adeb88787645 39:784a3f4e6202
4 4
5 import javax.sound.sampled.AudioFormat; 5 import javax.sound.sampled.AudioFormat;
6 6
7 public interface SoundProcessor { 7 public interface SoundProcessor {
8 8
9 void cleanup(); 9 /**
10 * Called when the SoundProcessor is being destroyed, and
11 * there are no more samples to process. This happens at the
12 * latest when the Application is shutting down.
13 *
14 */
15 void cleanup();
10 16
11 void process(ByteBuffer audioSamples, int numSamples, AudioFormat format); 17 /**
18 *
19 * Called whenever there are new audio samples to process. The
20 * audioSamples ByteBuffer contains 3D audio data rendered by
21 * OpenAL.
22 *
23 * @param audioSamples a ByteBuffer containing processed audio
24 * samples
25 * @param numSamples the number of samples, in bytes, that are valid
26 * @param format the format of the audio samples in audioSamples
27 */
28 void process(ByteBuffer audioSamples, int numSamples, AudioFormat format);
12 29
13 } 30 }