Mercurial > jmeCapture
view src/com/aurellem/capture/audio/CompositeSoundProcessor.java @ 24:5f616cc420dd
improved WaveFileWriter using tritonus
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sun, 30 Oct 2011 04:42:40 -0700 |
parents | 4de7988407ef |
children | 5249c8a9603c be37291c62b8 |
line wrap: on
line source
1 package com.aurellem.capture.audio;3 import java.nio.ByteBuffer;5 /**6 * Method of Combination for sound processors. This SoundProcessor will7 * run the methods of each of its constituent SoundProcessors in the order8 * in which it was constructed.9 *10 * @author Robert McIntyre11 *12 */13 public class CompositeSoundProcessor implements SoundProcessor{15 SoundProcessor[] processors;17 public CompositeSoundProcessor(SoundProcessor...processors){18 this.processors = processors;19 }21 public void process(ByteBuffer audioSamples, int numSamples) {22 for (SoundProcessor sp : processors){23 sp.process(audioSamples, numSamples);24 }25 }27 public void cleanup() {28 for (SoundProcessor sp : processors){29 sp.cleanup();30 }31 }32 }