Mercurial > jmeCapture
annotate src/com/aurellem/capture/audio/SoundProcessor.java @ 56:afc437f637bd
improved formating
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Dec 2011 19:25:27 -0600 |
parents | 784a3f4e6202 |
children | 23e3df41db3c |
rev | line source |
---|---|
rlm@9 | 1 package com.aurellem.capture.audio; |
rlm@9 | 2 |
rlm@9 | 3 import java.nio.ByteBuffer; |
rlm@9 | 4 |
rlm@30 | 5 import javax.sound.sampled.AudioFormat; |
rlm@30 | 6 |
rlm@9 | 7 public interface SoundProcessor { |
rlm@9 | 8 |
rlm@39 | 9 /** |
rlm@39 | 10 * Called when the SoundProcessor is being destroyed, and |
rlm@39 | 11 * there are no more samples to process. This happens at the |
rlm@39 | 12 * latest when the Application is shutting down. |
rlm@39 | 13 * |
rlm@39 | 14 */ |
rlm@39 | 15 void cleanup(); |
rlm@9 | 16 |
rlm@39 | 17 /** |
rlm@39 | 18 * |
rlm@39 | 19 * Called whenever there are new audio samples to process. The |
rlm@39 | 20 * audioSamples ByteBuffer contains 3D audio data rendered by |
rlm@39 | 21 * OpenAL. |
rlm@39 | 22 * |
rlm@39 | 23 * @param audioSamples a ByteBuffer containing processed audio |
rlm@39 | 24 * samples |
rlm@39 | 25 * @param numSamples the number of samples, in bytes, that are valid |
rlm@39 | 26 * @param format the format of the audio samples in audioSamples |
rlm@39 | 27 */ |
rlm@39 | 28 void process(ByteBuffer audioSamples, int numSamples, AudioFormat format); |
rlm@9 | 29 |
rlm@9 | 30 } |