OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | |
3 * | |
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 | |
6 * tree. An additional intellectual property rights grant can be found | |
7 * in the file PATENTS. All contributing project authors may | |
8 * be found in the AUTHORS file in the root of the source tree. | |
9 */ | |
10 | |
11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AEC_DUMP_BASED_SIMULATOR_H_ | |
12 #define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AEC_DUMP_BASED_SIMULATOR_H_ | |
13 | |
14 #include "webrtc/modules/audio_processing/test/audio_processing_simulator.h" | |
15 | |
16 #include "webrtc/base/constructormagic.h" | |
17 | |
18 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD | |
19 #include "external/webrtc/webrtc/modules/audio_processing/debug.pb.h" | |
20 #else | |
21 #include "webrtc/modules/audio_processing/debug.pb.h" | |
22 #endif | |
23 | |
24 namespace webrtc { | |
25 namespace test { | |
26 | |
27 // Used to perform an audio processing simulation from an aec dump. | |
28 class AecDumpBasedSimulator final : public AudioProcessingSimulator { | |
29 public: | |
30 explicit AecDumpBasedSimulator(const SimulationSettings& settings) | |
31 : AudioProcessingSimulator(settings) {} | |
32 virtual ~AecDumpBasedSimulator() {} | |
33 | |
34 // Processes the messages in the aecdump file. | |
35 void Process() override; | |
36 | |
37 private: | |
38 void HandleMessage(const webrtc::audioproc::Init& msg); | |
39 void HandleMessage(const webrtc::audioproc::Stream& msg); | |
40 void HandleMessage(const webrtc::audioproc::ReverseStream& msg); | |
41 void HandleMessage(const webrtc::audioproc::Config& msg); | |
42 void PrepareProcessStreamCall(const webrtc::audioproc::Stream& msg); | |
43 void PrepareReverseProcessStreamCall( | |
44 const webrtc::audioproc::ReverseStream& msg); | |
45 void VerifyProcessStreamBitExactness(const webrtc::audioproc::Stream& msg); | |
46 | |
47 enum InterfaceType { | |
aluebs-webrtc
2016/05/03 22:30:41
This is defined in wav_based_simulator and here. C
peah-webrtc
2016/05/09 11:37:31
I don't really follow this comment. As far as I ca
aluebs-webrtc
2016/05/09 16:27:32
You are right. This is only defined here. My bad.
peah-webrtc
2016/05/11 12:19:27
Acknowledged.
| |
48 kFixedInterface, | |
49 kFloatInterface, | |
50 kNotSpecified, | |
51 }; | |
52 | |
53 FILE* dump_input_file_; | |
54 InterfaceType interface_used_ = InterfaceType::kNotSpecified; | |
55 | |
56 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AecDumpBasedSimulator); | |
57 }; | |
58 | |
59 } // namespace test | |
60 } // namespace webrtc | |
61 | |
62 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AEC_DUMP_BASED_SIMULATOR_H_ | |
OLD | NEW |