| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2  *  Copyright (c) 2016 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 71   for (size_t ch = 0; ch < dest->num_channels_; ++ch) { | 71   for (size_t ch = 0; ch < dest->num_channels_; ++ch) { | 
| 72     for (size_t sample = 0; sample < dest->samples_per_channel_; ++sample) { | 72     for (size_t sample = 0; sample < dest->samples_per_channel_; ++sample) { | 
| 73       dest->data_[sample * dest->num_channels_ + ch] = | 73       dest->data_[sample * dest->num_channels_ + ch] = | 
| 74           src.channels()[ch][sample] * 32767; | 74           src.channels()[ch][sample] * 32767; | 
| 75     } | 75     } | 
| 76   } | 76   } | 
| 77 } | 77 } | 
| 78 | 78 | 
| 79 AudioProcessingSimulator::AudioProcessingSimulator( | 79 AudioProcessingSimulator::AudioProcessingSimulator( | 
| 80     const SimulationSettings& settings) | 80     const SimulationSettings& settings) | 
| 81     : settings_(settings) { | 81     : settings_(settings), worker_queue_("file_writer_task_queue") { | 
| 82   if (settings_.ed_graph_output_filename && | 82   if (settings_.ed_graph_output_filename && | 
| 83       settings_.ed_graph_output_filename->size() > 0) { | 83       settings_.ed_graph_output_filename->size() > 0) { | 
| 84     residual_echo_likelihood_graph_writer_.open( | 84     residual_echo_likelihood_graph_writer_.open( | 
| 85         *settings_.ed_graph_output_filename); | 85         *settings_.ed_graph_output_filename); | 
| 86     RTC_CHECK(residual_echo_likelihood_graph_writer_.is_open()); | 86     RTC_CHECK(residual_echo_likelihood_graph_writer_.is_open()); | 
| 87     WriteEchoLikelihoodGraphFileHeader(&residual_echo_likelihood_graph_writer_); | 87     WriteEchoLikelihoodGraphFileHeader(&residual_echo_likelihood_graph_writer_); | 
| 88   } | 88   } | 
| 89 } | 89 } | 
| 90 | 90 | 
| 91 AudioProcessingSimulator::~AudioProcessingSimulator() { | 91 AudioProcessingSimulator::~AudioProcessingSimulator() { | 
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 380             static_cast<NoiseSuppression::Level>(*settings_.ns_level))); | 380             static_cast<NoiseSuppression::Level>(*settings_.ns_level))); | 
| 381   } | 381   } | 
| 382 | 382 | 
| 383   if (settings_.use_ts) { | 383   if (settings_.use_ts) { | 
| 384     ap_->set_stream_key_pressed(*settings_.use_ts); | 384     ap_->set_stream_key_pressed(*settings_.use_ts); | 
| 385   } | 385   } | 
| 386 | 386 | 
| 387   if (settings_.aec_dump_output_filename) { | 387   if (settings_.aec_dump_output_filename) { | 
| 388     size_t kMaxFilenameSize = AudioProcessing::kMaxFilenameSize; | 388     size_t kMaxFilenameSize = AudioProcessing::kMaxFilenameSize; | 
| 389     RTC_CHECK_LE(settings_.aec_dump_output_filename->size(), kMaxFilenameSize); | 389     RTC_CHECK_LE(settings_.aec_dump_output_filename->size(), kMaxFilenameSize); | 
| 390     RTC_CHECK_EQ(AudioProcessing::kNoError, | 390     RTC_CHECK_EQ( | 
| 391                  ap_->StartDebugRecording( | 391         AudioProcessing::kNoError, | 
| 392                      settings_.aec_dump_output_filename->c_str(), -1)); | 392         ap_->StartDebugRecording(settings_.aec_dump_output_filename->c_str(), | 
|  | 393                                  -1, &worker_queue_)); | 
| 393   } | 394   } | 
| 394 } | 395 } | 
| 395 | 396 | 
| 396 }  // namespace test | 397 }  // namespace test | 
| 397 }  // namespace webrtc | 398 }  // namespace webrtc | 
| OLD | NEW | 
|---|