OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 output_config_.set_sample_rate_hz(rate_hz); | 180 output_config_.set_sample_rate_hz(rate_hz); |
181 MaybeResetBuffer(&output_, output_config_); | 181 MaybeResetBuffer(&output_, output_config_); |
182 } | 182 } |
183 | 183 |
184 void DebugDumpGenerator::SetOutputChannels(int channels) { | 184 void DebugDumpGenerator::SetOutputChannels(int channels) { |
185 output_config_.set_num_channels(channels); | 185 output_config_.set_num_channels(channels); |
186 MaybeResetBuffer(&output_, output_config_); | 186 MaybeResetBuffer(&output_, output_config_); |
187 } | 187 } |
188 | 188 |
189 void DebugDumpGenerator::StartRecording() { | 189 void DebugDumpGenerator::StartRecording() { |
190 apm_->StartDebugRecording(dump_file_name_.c_str(), -1); | 190 apm_->StartDebugRecording(dump_file_name_.c_str(), -1, nullptr); |
191 } | 191 } |
192 | 192 |
193 void DebugDumpGenerator::Process(size_t num_blocks) { | 193 void DebugDumpGenerator::Process(size_t num_blocks) { |
194 for (size_t i = 0; i < num_blocks; ++i) { | 194 for (size_t i = 0; i < num_blocks; ++i) { |
195 ReadAndDeinterleave(&reverse_audio_, reverse_file_channels_, | 195 ReadAndDeinterleave(&reverse_audio_, reverse_file_channels_, |
196 reverse_config_, reverse_->channels()); | 196 reverse_config_, reverse_->channels()); |
197 ReadAndDeinterleave(&input_audio_, input_file_channels_, input_config_, | 197 ReadAndDeinterleave(&input_audio_, input_file_channels_, input_config_, |
198 input_->channels()); | 198 input_->channels()); |
199 RTC_CHECK_EQ(AudioProcessing::kNoError, apm_->set_stream_delay_ms(100)); | 199 RTC_CHECK_EQ(AudioProcessing::kNoError, apm_->set_stream_delay_ms(100)); |
200 apm_->set_stream_key_pressed(i % 10 == 9); | 200 apm_->set_stream_key_pressed(i % 10 == 9); |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 config.Set<ExperimentalNs>(new ExperimentalNs(true)); | 588 config.Set<ExperimentalNs>(new ExperimentalNs(true)); |
589 DebugDumpGenerator generator(config, AudioProcessing::Config()); | 589 DebugDumpGenerator generator(config, AudioProcessing::Config()); |
590 generator.StartRecording(); | 590 generator.StartRecording(); |
591 generator.Process(100); | 591 generator.Process(100); |
592 generator.StopRecording(); | 592 generator.StopRecording(); |
593 VerifyDebugDump(generator.dump_file_name()); | 593 VerifyDebugDump(generator.dump_file_name()); |
594 } | 594 } |
595 | 595 |
596 } // namespace test | 596 } // namespace test |
597 } // namespace webrtc | 597 } // namespace webrtc |
OLD | NEW |