Mercurial > jmeCapture
view src/com/aurellem/capture/audio/CompositeSoundProcessor.java @ 71:2c50a0c99715
remove xuggle, since I will never use it.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 10 Mar 2014 18:54:35 -0400 |
parents | d799a0278cc9 |
children |
line wrap: on
line source
1 package com.aurellem.capture.audio;3 import java.nio.ByteBuffer;5 import javax.sound.sampled.AudioFormat;7 /**8 * Method of Combination for sound processors. This SoundProcessor will9 * run the methods of each of its constituent SoundProcessors in the order10 * in which it was constructed.11 *12 * @author Robert McIntyre13 */14 public class CompositeSoundProcessor implements SoundProcessor{16 SoundProcessor[] processors;18 public CompositeSoundProcessor(SoundProcessor...processors){19 this.processors = processors;20 }22 public void process(ByteBuffer audioSamples, int numSamples, AudioFormat format) {23 for (SoundProcessor sp : processors){24 sp.process(audioSamples, numSamples, format);25 }26 }28 public void cleanup() {29 for (SoundProcessor sp : processors){30 sp.cleanup();31 }32 }33 }