Mercurial > jmeCapture
view src/com/aurellem/capture/audio/CompositeSoundProcessor.java @ 69:ddb300c5335f
fixed RatchetTimer time reporting.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Wed, 29 May 2013 17:15:41 -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 }