diff src/com/aurellem/capture/audio/CompositeSoundProcessor.java @ 27:5249c8a9603c

changed SoundProcessors to use AudioFormat
author Robert McIntyre <rlm@mit.edu>
date Sun, 30 Oct 2011 08:10:26 -0700
parents 4de7988407ef
children
line wrap: on
line diff
     1.1 --- a/src/com/aurellem/capture/audio/CompositeSoundProcessor.java	Sun Oct 30 04:43:39 2011 -0700
     1.2 +++ b/src/com/aurellem/capture/audio/CompositeSoundProcessor.java	Sun Oct 30 08:10:26 2011 -0700
     1.3 @@ -2,6 +2,8 @@
     1.4  
     1.5  import java.nio.ByteBuffer;
     1.6  
     1.7 +import javax.sound.sampled.AudioFormat;
     1.8 +
     1.9  /**
    1.10   * Method of Combination for sound processors.  This SoundProcessor will 
    1.11   * run the methods of each of its constituent SoundProcessors in the order 
    1.12 @@ -18,15 +20,16 @@
    1.13  		this.processors = processors;
    1.14  	}
    1.15  	
    1.16 -	public void process(ByteBuffer audioSamples, int numSamples) {
    1.17 +	public void process(ByteBuffer audioSamples, AudioFormat format,  int numSamples) {
    1.18  		for (SoundProcessor sp : processors){
    1.19 -			sp.process(audioSamples, numSamples);
    1.20 +			sp.process(audioSamples, format, numSamples);
    1.21  		}
    1.22  	}
    1.23  	
    1.24  	public void cleanup() {
    1.25  		for (SoundProcessor sp : processors){
    1.26 -			sp.cleanup();
    1.27 +			sp.cleanup(); 
    1.28  		}
    1.29  	}
    1.30 +
    1.31  }