summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbjornv@webrtc.org <bjornv@webrtc.org>2014-09-24 12:21:51 +0000
committerbjornv@webrtc.org <bjornv@webrtc.org>2014-09-24 12:21:51 +0000
commit95eaf0f655937e968668e2f53424ea42b07794a7 (patch)
treeef9f5b04d8e4b9d6e466b03778b2f25b830e0adf
parent09c2178f36d8975aefeb35bc81126410aed2d6af (diff)
downloadwebrtc-95eaf0f655937e968668e2f53424ea42b07794a7.tar.gz
audioproc: Now also writes to output file in simulation mode
After changing to use wav as default file format no output was written in simulation mode. BUG=3359 TESTED=locally R=aluebs@webrtc.org, kwiberg@webrtc.org Review URL: https://webrtc-codereview.appspot.com/25639004 git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@7286 4adac7df-926f-26a2-2b94-8c16560cd09d
-rw-r--r--modules/audio_processing/test/process_test.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/audio_processing/test/process_test.cc b/modules/audio_processing/test/process_test.cc
index b3f6a775..b6d51e47 100644
--- a/modules/audio_processing/test/process_test.cc
+++ b/modules/audio_processing/test/process_test.cc
@@ -874,7 +874,7 @@ void void_main(int argc, char* argv[]) {
near_frame.samples_per_channel_ = samples_per_channel;
if (!raw_output) {
- // The WAV file needs to be reset every time, because it cant change
+ // The WAV file needs to be reset every time, because it can't change
// it's sample rate or number of channels.
output_wav_file.reset(new WavFile(out_filename + ".wav",
sample_rate_hz,
@@ -1028,6 +1028,11 @@ void void_main(int argc, char* argv[]) {
if (raw_output && !output_raw_file) {
output_raw_file.reset(new RawFile(out_filename + ".pcm"));
}
+ if (!raw_output && !output_wav_file) {
+ output_wav_file.reset(new WavFile(out_filename + ".wav",
+ sample_rate_hz,
+ num_capture_output_channels));
+ }
WriteIntData(near_frame.data_,
size,
output_wav_file.get(),