Chromium Code Reviews| 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 12 matching lines...) Expand all Loading... | |
| 23 #include "webrtc/modules/audio_processing/debug.pb.h" | 23 #include "webrtc/modules/audio_processing/debug.pb.h" |
| 24 #endif | 24 #endif |
| 25 RTC_POP_IGNORING_WUNDEF() | 25 RTC_POP_IGNORING_WUNDEF() |
| 26 | 26 |
| 27 namespace webrtc { | 27 namespace webrtc { |
| 28 namespace test { | 28 namespace test { |
| 29 | 29 |
| 30 // Used to perform an audio processing simulation from an aec dump. | 30 // Used to perform an audio processing simulation from an aec dump. |
| 31 class AecDumpBasedSimulator final : public AudioProcessingSimulator { | 31 class AecDumpBasedSimulator final : public AudioProcessingSimulator { |
| 32 public: | 32 public: |
| 33 explicit AecDumpBasedSimulator(const SimulationSettings& settings) | 33 explicit AecDumpBasedSimulator(const SimulationSettings& settings); |
| 34 : AudioProcessingSimulator(settings) {} | 34 ~AecDumpBasedSimulator() override; |
| 35 ~AecDumpBasedSimulator() override {} | |
| 36 | 35 |
| 37 // Processes the messages in the aecdump file. | 36 // Processes the messages in the aecdump file. |
| 38 void Process() override; | 37 void Process() override; |
| 39 | 38 |
| 40 private: | 39 private: |
| 41 void HandleMessage(const webrtc::audioproc::Init& msg); | 40 void HandleMessage(const webrtc::audioproc::Init& msg); |
| 42 void HandleMessage(const webrtc::audioproc::Stream& msg); | 41 void HandleMessage(const webrtc::audioproc::Stream& msg); |
| 43 void HandleMessage(const webrtc::audioproc::ReverseStream& msg); | 42 void HandleMessage(const webrtc::audioproc::ReverseStream& msg); |
| 44 void HandleMessage(const webrtc::audioproc::Config& msg); | 43 void HandleMessage(const webrtc::audioproc::Config& msg); |
| 45 void PrepareProcessStreamCall(const webrtc::audioproc::Stream& msg, | 44 void PrepareProcessStreamCall(const webrtc::audioproc::Stream& msg, |
| 46 bool* set_stream_analog_level_called); | 45 bool* set_stream_analog_level_called); |
| 47 void PrepareReverseProcessStreamCall( | 46 void PrepareReverseProcessStreamCall( |
| 48 const webrtc::audioproc::ReverseStream& msg); | 47 const webrtc::audioproc::ReverseStream& msg); |
| 49 void VerifyProcessStreamBitExactness(const webrtc::audioproc::Stream& msg); | 48 void VerifyProcessStreamBitExactness(const webrtc::audioproc::Stream& msg); |
| 50 | 49 |
| 51 enum InterfaceType { | 50 enum InterfaceType { |
| 52 kFixedInterface, | 51 kFixedInterface, |
| 53 kFloatInterface, | 52 kFloatInterface, |
| 54 kNotSpecified, | 53 kNotSpecified, |
| 55 }; | 54 }; |
| 56 | 55 |
| 57 FILE* dump_input_file_; | 56 FILE* dump_input_file_; |
| 57 std::unique_ptr<WavReader> artificial_nearend_file_; | |
|
ivoc
2016/12/08 10:55:19
I think this can be removed, it does not seem to b
peah-webrtc
2016/12/08 12:02:26
Good find!
Done.
| |
| 58 std::unique_ptr<ChannelBufferWavReader> artificial_nearend_buffer_reader_; | |
|
ivoc
2016/12/08 10:55:19
This can be removed as well right? The same member
peah-webrtc
2016/12/08 12:02:26
Good find!
Done.
| |
| 58 InterfaceType interface_used_ = InterfaceType::kNotSpecified; | 59 InterfaceType interface_used_ = InterfaceType::kNotSpecified; |
| 59 | 60 |
| 60 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AecDumpBasedSimulator); | 61 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AecDumpBasedSimulator); |
| 61 }; | 62 }; |
| 62 | 63 |
| 63 } // namespace test | 64 } // namespace test |
| 64 } // namespace webrtc | 65 } // namespace webrtc |
| 65 | 66 |
| 66 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AEC_DUMP_BASED_SIMULATOR_H_ | 67 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_AEC_DUMP_BASED_SIMULATOR_H_ |
| OLD | NEW |