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 |
11 #include <stddef.h> // size_t | 11 #include <stddef.h> // size_t |
12 | 12 |
13 #include <memory> | 13 #include <memory> |
14 #include <string> | 14 #include <string> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
| 17 #include "webrtc/base/task_queue.h" |
17 #include "webrtc/modules/audio_coding/neteq/tools/resample_input_audio_file.h" | 18 #include "webrtc/modules/audio_coding/neteq/tools/resample_input_audio_file.h" |
18 #include "webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h" | 19 #include "webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h" |
19 #include "webrtc/modules/audio_processing/test/debug_dump_replayer.h" | 20 #include "webrtc/modules/audio_processing/test/debug_dump_replayer.h" |
20 #include "webrtc/modules/audio_processing/test/test_utils.h" | 21 #include "webrtc/modules/audio_processing/test/test_utils.h" |
21 #include "webrtc/rtc_base/task_queue.h" | |
22 #include "webrtc/test/gtest.h" | 22 #include "webrtc/test/gtest.h" |
23 #include "webrtc/test/testsupport/fileutils.h" | 23 #include "webrtc/test/testsupport/fileutils.h" |
24 | 24 |
| 25 |
25 namespace webrtc { | 26 namespace webrtc { |
26 namespace test { | 27 namespace test { |
27 | 28 |
28 namespace { | 29 namespace { |
29 | 30 |
30 void MaybeResetBuffer(std::unique_ptr<ChannelBuffer<float>>* buffer, | 31 void MaybeResetBuffer(std::unique_ptr<ChannelBuffer<float>>* buffer, |
31 const StreamConfig& config) { | 32 const StreamConfig& config) { |
32 auto& buffer_ref = *buffer; | 33 auto& buffer_ref = *buffer; |
33 if (!buffer_ref.get() || buffer_ref->num_frames() != config.num_frames() || | 34 if (!buffer_ref.get() || buffer_ref->num_frames() != config.num_frames() || |
34 buffer_ref->num_channels() != config.num_channels()) { | 35 buffer_ref->num_channels() != config.num_channels()) { |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 config.Set<ExperimentalNs>(new ExperimentalNs(true)); | 592 config.Set<ExperimentalNs>(new ExperimentalNs(true)); |
592 DebugDumpGenerator generator(config, AudioProcessing::Config()); | 593 DebugDumpGenerator generator(config, AudioProcessing::Config()); |
593 generator.StartRecording(); | 594 generator.StartRecording(); |
594 generator.Process(100); | 595 generator.Process(100); |
595 generator.StopRecording(); | 596 generator.StopRecording(); |
596 VerifyDebugDump(generator.dump_file_name()); | 597 VerifyDebugDump(generator.dump_file_name()); |
597 } | 598 } |
598 | 599 |
599 } // namespace test | 600 } // namespace test |
600 } // namespace webrtc | 601 } // namespace webrtc |
OLD | NEW |