From 4458d09ee422e78f494fb30d65f63d6bc321dba6 Mon Sep 17 00:00:00 2001 From: Alejandro Luebs Date: Thu, 18 Feb 2016 19:16:08 -0800 Subject: [PATCH] Drop support for playing output through aplay in intelligibility_proc It was hardly used, making the code more complex than needed and caused problems on iOS because it uses system. BUG=webrtc:5549 R=kjellander@webrtc.org Review URL: https://codereview.webrtc.org/1708353002 . Cr-Commit-Position: refs/heads/master@{#11677} --- .../audio_processing_tests.gypi | 12 -------- .../test/intelligibility_proc.cc | 30 ++----------------- 2 files changed, 3 insertions(+), 39 deletions(-) diff --git a/webrtc/modules/audio_processing/audio_processing_tests.gypi b/webrtc/modules/audio_processing/audio_processing_tests.gypi index f672226e4b..ad82f4bdad 100644 --- a/webrtc/modules/audio_processing/audio_processing_tests.gypi +++ b/webrtc/modules/audio_processing/audio_processing_tests.gypi @@ -72,18 +72,6 @@ 'sources': [ 'intelligibility/test/intelligibility_proc.cc', ], - 'conditions': [ - ['OS=="ios"', { - 'xcode_settings': { - 'WARNING_CFLAGS': [ - # Suppress compiler warnings about deprecated that triggered - # when moving from ios_deployment_target 7.0 to 9.0. - # See webrtc:5549 for more details. - '-Wno-deprecated-declarations', - ], - }, - }], - ], }, # intelligibility_proc ], 'conditions': [ diff --git a/webrtc/modules/audio_processing/intelligibility/test/intelligibility_proc.cc b/webrtc/modules/audio_processing/intelligibility/test/intelligibility_proc.cc index f949046b1d..1ec85f0abb 100644 --- a/webrtc/modules/audio_processing/intelligibility/test/intelligibility_proc.cc +++ b/webrtc/modules/audio_processing/intelligibility/test/intelligibility_proc.cc @@ -14,26 +14,16 @@ // Use --help for options. // -#include -#include #include -#include -#include #include "gflags/gflags.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webrtc/base/checks.h" #include "webrtc/base/criticalsection.h" #include "webrtc/common_audio/include/audio_util.h" -#include "webrtc/common_audio/real_fourier.h" #include "webrtc/common_audio/wav_file.h" #include "webrtc/modules/audio_processing/audio_buffer.h" -#include "webrtc/modules/audio_processing/include/audio_processing.h" #include "webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h" -#include "webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h" #include "webrtc/modules/audio_processing/noise_suppression_impl.h" -#include "webrtc/system_wrappers/include/critical_section_wrapper.h" -#include "webrtc/test/testsupport/fileutils.h" using std::complex; @@ -51,10 +41,7 @@ DEFINE_double(gain_limit, 1000.0, "Maximum gain change in one block."); DEFINE_string(clear_file, "speech.wav", "Input file with clear speech."); DEFINE_string(noise_file, "noise.wav", "Input file with noise data."); -DEFINE_string(out_file, - "proc_enhanced.wav", - "Enhanced output. Use '-' to " - "play through aplay immediately."); +DEFINE_string(out_file, "proc_enhanced.wav", "Enhanced output file."); const size_t kNumChannels = 1; @@ -128,19 +115,8 @@ void void_main(int argc, char* argv[]) { FloatToFloatS16(&in_fpcm[0], samples, &in_fpcm[0]); - if (FLAGS_out_file.compare("-") == 0) { - const std::string temp_out_filename = - test::TempFilename(test::WorkingDir(), "temp_wav_file"); - { - WavWriter out_file(temp_out_filename, FLAGS_sample_rate, kNumChannels); - out_file.WriteSamples(&in_fpcm[0], samples); - } - system(("aplay " + temp_out_filename).c_str()); - system(("rm " + temp_out_filename).c_str()); - } else { - WavWriter out_file(FLAGS_out_file, FLAGS_sample_rate, kNumChannels); - out_file.WriteSamples(&in_fpcm[0], samples); - } + WavWriter out_file(FLAGS_out_file, FLAGS_sample_rate, kNumChannels); + out_file.WriteSamples(&in_fpcm[0], samples); } } // namespace