comparison src/com/aurellem/capture/audio/WaveFileWriter.java @ 23:b643413c3aba

going to improve WaveFileWriter
author Robert McIntyre <rlm@mit.edu>
date Sun, 30 Oct 2011 04:22:14 -0700
parents 8a6b1684f536
children 5f616cc420dd
comparison
equal deleted inserted replaced
22:c7a07eefaeea 23:b643413c3aba
9 import javax.sound.sampled.AudioFileFormat; 9 import javax.sound.sampled.AudioFileFormat;
10 import javax.sound.sampled.AudioFormat; 10 import javax.sound.sampled.AudioFormat;
11 import javax.sound.sampled.AudioInputStream; 11 import javax.sound.sampled.AudioInputStream;
12 import javax.sound.sampled.AudioSystem; 12 import javax.sound.sampled.AudioSystem;
13 13
14 import org.tritonus.sampled.file.WaveAudioOutputStream;
15
14 public class WaveFileWriter implements SoundProcessor { 16 public class WaveFileWriter implements SoundProcessor {
15 17
16 public Vector<Byte> fullWaveData = new Vector<Byte>(); 18 public Vector<Byte> fullWaveData = new Vector<Byte>();
17 public File targetFile; 19 public File targetFile;
18 20
19 public WaveFileWriter(File targetFile){ 21 public WaveFileWriter(File targetFile){
20 this.targetFile = targetFile; 22 this.targetFile = targetFile;
21 } 23 }
24
25
26 WaveAudioOutputStream wao;
27
22 28
23 public void cleanup() { 29 public void cleanup() {
24 byte[] data = new byte[this.fullWaveData.size()]; 30 byte[] data = new byte[this.fullWaveData.size()];
25 31
26 for (int i = 0; i < this.fullWaveData.size(); i++){ 32 for (int i = 0; i < this.fullWaveData.size(); i++){