Mercurial > jmeCapture
comparison src/com/aurellem/capture/audio/WaveFileWriter.java @ 30:be37291c62b8
propagated AudioFormat to other classes.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sun, 30 Oct 2011 10:11:21 -0700 |
parents | 95648b0c12bc |
children | b67ffa8aa0b9 |
comparison
equal
deleted
inserted
replaced
29:9f58273090df | 30:be37291c62b8 |
---|---|
29 try {wao.close();} | 29 try {wao.close();} |
30 catch (IOException e) {e.printStackTrace();} | 30 catch (IOException e) {e.printStackTrace();} |
31 } | 31 } |
32 | 32 |
33 | 33 |
34 public void process(ByteBuffer audioSamples, int numSamples) { | 34 public void process(ByteBuffer audioSamples, int numSamples, AudioFormat format) { |
35 byte[] data = new byte[numSamples]; | 35 byte[] data = new byte[numSamples]; |
36 audioSamples.get(data, 0, numSamples); | 36 audioSamples.get(data, 0, numSamples); |
37 try {wao.write(data, 0, numSamples);} | 37 try {wao.write(data, 0, numSamples);} |
38 catch (IOException e) {e.printStackTrace();} | 38 catch (IOException e) {e.printStackTrace();} |
39 } | 39 } |