| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 void StreamParametersTest(Format format); | 384 void StreamParametersTest(Format format); |
| 385 int ProcessStreamChooser(Format format); | 385 int ProcessStreamChooser(Format format); |
| 386 int AnalyzeReverseStreamChooser(Format format); | 386 int AnalyzeReverseStreamChooser(Format format); |
| 387 void ProcessDebugDump(const std::string& in_filename, | 387 void ProcessDebugDump(const std::string& in_filename, |
| 388 const std::string& out_filename, | 388 const std::string& out_filename, |
| 389 Format format, | 389 Format format, |
| 390 int max_size_bytes); | 390 int max_size_bytes); |
| 391 void VerifyDebugDumpTest(Format format); | 391 void VerifyDebugDumpTest(Format format); |
| 392 | 392 |
| 393 const std::string output_path_; | 393 const std::string output_path_; |
| 394 const std::string ref_path_; | |
| 395 const std::string ref_filename_; | 394 const std::string ref_filename_; |
| 396 std::unique_ptr<AudioProcessing> apm_; | 395 std::unique_ptr<AudioProcessing> apm_; |
| 397 AudioFrame* frame_; | 396 AudioFrame* frame_; |
| 398 AudioFrame* revframe_; | 397 AudioFrame* revframe_; |
| 399 std::unique_ptr<ChannelBuffer<float> > float_cb_; | 398 std::unique_ptr<ChannelBuffer<float> > float_cb_; |
| 400 std::unique_ptr<ChannelBuffer<float> > revfloat_cb_; | 399 std::unique_ptr<ChannelBuffer<float> > revfloat_cb_; |
| 401 int output_sample_rate_hz_; | 400 int output_sample_rate_hz_; |
| 402 size_t num_output_channels_; | 401 size_t num_output_channels_; |
| 403 FILE* far_file_; | 402 FILE* far_file_; |
| 404 FILE* near_file_; | 403 FILE* near_file_; |
| 405 FILE* out_file_; | 404 FILE* out_file_; |
| 406 }; | 405 }; |
| 407 | 406 |
| 408 ApmTest::ApmTest() | 407 ApmTest::ApmTest() |
| 409 : output_path_(test::OutputPath()), | 408 : output_path_(test::OutputPath()), |
| 410 #ifndef WEBRTC_IOS | |
| 411 ref_path_(test::ProjectRootPath() + "data/audio_processing/"), | |
| 412 #else | |
| 413 // On iOS test data is flat in the project root dir | |
| 414 ref_path_(test::ProjectRootPath()), | |
| 415 #endif | |
| 416 #if defined(WEBRTC_AUDIOPROC_FIXED_PROFILE) | 409 #if defined(WEBRTC_AUDIOPROC_FIXED_PROFILE) |
| 417 ref_filename_(ref_path_ + "output_data_fixed.pb"), | 410 ref_filename_(test::ResourcePath("audio_processing/output_data_fixed", |
| 411 "pb")), |
| 418 #elif defined(WEBRTC_AUDIOPROC_FLOAT_PROFILE) | 412 #elif defined(WEBRTC_AUDIOPROC_FLOAT_PROFILE) |
| 419 #if defined(WEBRTC_MAC) | 413 #if defined(WEBRTC_MAC) |
| 420 // A different file for Mac is needed because on this platform the AEC | 414 // A different file for Mac is needed because on this platform the AEC |
| 421 // constant |kFixedDelayMs| value is 20 and not 50 as it is on the rest. | 415 // constant |kFixedDelayMs| value is 20 and not 50 as it is on the rest. |
| 422 ref_filename_(ref_path_ + "output_data_mac.pb"), | 416 ref_filename_(test::ResourcePath("audio_processing/output_data_mac", |
| 417 "pb")), |
| 423 #else | 418 #else |
| 424 ref_filename_(ref_path_ + "output_data_float.pb"), | 419 ref_filename_(test::ResourcePath("audio_processing/output_data_float", |
| 420 "pb")), |
| 425 #endif | 421 #endif |
| 426 #endif | 422 #endif |
| 427 frame_(NULL), | 423 frame_(NULL), |
| 428 revframe_(NULL), | 424 revframe_(NULL), |
| 429 output_sample_rate_hz_(0), | 425 output_sample_rate_hz_(0), |
| 430 num_output_channels_(0), | 426 num_output_channels_(0), |
| 431 far_file_(NULL), | 427 far_file_(NULL), |
| 432 near_file_(NULL), | 428 near_file_(NULL), |
| 433 out_file_(NULL) { | 429 out_file_(NULL) { |
| 434 Config config; | 430 Config config; |
| (...skipping 2442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2877 // TODO(peah): Remove the testing for | 2873 // TODO(peah): Remove the testing for |
| 2878 // apm->capture_nonlocked_.level_controller_enabled once the value in config_ | 2874 // apm->capture_nonlocked_.level_controller_enabled once the value in config_ |
| 2879 // is instead used to activate the level controller. | 2875 // is instead used to activate the level controller. |
| 2880 EXPECT_FALSE(apm->capture_nonlocked_.level_controller_enabled); | 2876 EXPECT_FALSE(apm->capture_nonlocked_.level_controller_enabled); |
| 2881 EXPECT_NEAR(kTargetLcPeakLeveldBFS, | 2877 EXPECT_NEAR(kTargetLcPeakLeveldBFS, |
| 2882 apm->config_.level_controller.initial_peak_level_dbfs, | 2878 apm->config_.level_controller.initial_peak_level_dbfs, |
| 2883 std::numeric_limits<float>::epsilon()); | 2879 std::numeric_limits<float>::epsilon()); |
| 2884 } | 2880 } |
| 2885 | 2881 |
| 2886 } // namespace webrtc | 2882 } // namespace webrtc |
| OLD | NEW |