| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // Method is called after each block of output audio is received from ACM. | 57 // Method is called after each block of output audio is received from ACM. |
| 58 virtual void AfterGetAudio() {} | 58 virtual void AfterGetAudio() {} |
| 59 | 59 |
| 60 SimulatedClock clock_; | 60 SimulatedClock clock_; |
| 61 rtc::scoped_ptr<AudioCodingModule> acm_; | 61 rtc::scoped_ptr<AudioCodingModule> acm_; |
| 62 PacketSource* packet_source_; | 62 PacketSource* packet_source_; |
| 63 AudioSink* audio_sink_; | 63 AudioSink* audio_sink_; |
| 64 int output_freq_hz_; | 64 int output_freq_hz_; |
| 65 NumOutputChannels exptected_output_channels_; | 65 NumOutputChannels exptected_output_channels_; |
| 66 | 66 |
| 67 DISALLOW_COPY_AND_ASSIGN(AcmReceiveTestOldApi); | 67 RTC_DISALLOW_COPY_AND_ASSIGN(AcmReceiveTestOldApi); |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 // This test toggles the output frequency every |toggle_period_ms|. The test | 70 // This test toggles the output frequency every |toggle_period_ms|. The test |
| 71 // starts with |output_freq_hz_1|. Except for the toggling, it does the same | 71 // starts with |output_freq_hz_1|. Except for the toggling, it does the same |
| 72 // thing as AcmReceiveTestOldApi. | 72 // thing as AcmReceiveTestOldApi. |
| 73 class AcmReceiveTestToggleOutputFreqOldApi : public AcmReceiveTestOldApi { | 73 class AcmReceiveTestToggleOutputFreqOldApi : public AcmReceiveTestOldApi { |
| 74 public: | 74 public: |
| 75 AcmReceiveTestToggleOutputFreqOldApi( | 75 AcmReceiveTestToggleOutputFreqOldApi( |
| 76 PacketSource* packet_source, | 76 PacketSource* packet_source, |
| 77 AudioSink* audio_sink, | 77 AudioSink* audio_sink, |
| 78 int output_freq_hz_1, | 78 int output_freq_hz_1, |
| 79 int output_freq_hz_2, | 79 int output_freq_hz_2, |
| 80 int toggle_period_ms, | 80 int toggle_period_ms, |
| 81 NumOutputChannels exptected_output_channels); | 81 NumOutputChannels exptected_output_channels); |
| 82 | 82 |
| 83 protected: | 83 protected: |
| 84 void AfterGetAudio() override; | 84 void AfterGetAudio() override; |
| 85 | 85 |
| 86 const int output_freq_hz_1_; | 86 const int output_freq_hz_1_; |
| 87 const int output_freq_hz_2_; | 87 const int output_freq_hz_2_; |
| 88 const int toggle_period_ms_; | 88 const int toggle_period_ms_; |
| 89 int64_t last_toggle_time_ms_; | 89 int64_t last_toggle_time_ms_; |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 } // namespace test | 92 } // namespace test |
| 93 } // namespace webrtc | 93 } // namespace webrtc |
| 94 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RECEIVE_TEST_H_ | 94 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RECEIVE_TEST_H_ |
| OLD | NEW |