comparison src/com/aurellem/capture/audio/CompositeSoundProcessor.java @ 30:be37291c62b8

propagated AudioFormat to other classes.
author Robert McIntyre <rlm@mit.edu>
date Sun, 30 Oct 2011 10:11:21 -0700
parents 4de7988407ef
children d799a0278cc9
comparison
equal deleted inserted replaced
29:9f58273090df 30:be37291c62b8
1 package com.aurellem.capture.audio; 1 package com.aurellem.capture.audio;
2 2
3 import java.nio.ByteBuffer; 3 import java.nio.ByteBuffer;
4
5 import javax.sound.sampled.AudioFormat;
4 6
5 /** 7 /**
6 * Method of Combination for sound processors. This SoundProcessor will 8 * Method of Combination for sound processors. This SoundProcessor will
7 * run the methods of each of its constituent SoundProcessors in the order 9 * run the methods of each of its constituent SoundProcessors in the order
8 * in which it was constructed. 10 * in which it was constructed.
16 18
17 public CompositeSoundProcessor(SoundProcessor...processors){ 19 public CompositeSoundProcessor(SoundProcessor...processors){
18 this.processors = processors; 20 this.processors = processors;
19 } 21 }
20 22
21 public void process(ByteBuffer audioSamples, int numSamples) { 23 public void process(ByteBuffer audioSamples, int numSamples, AudioFormat format) {
22 for (SoundProcessor sp : processors){ 24 for (SoundProcessor sp : processors){
23 sp.process(audioSamples, numSamples); 25 sp.process(audioSamples, numSamples, format);
24 } 26 }
25 } 27 }
26 28
27 public void cleanup() { 29 public void cleanup() {
28 for (SoundProcessor sp : processors){ 30 for (SoundProcessor sp : processors){