OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 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 "webrtc/media/engine/apm_helpers.h" | 11 #include "webrtc/media/engine/apm_helpers.h" |
12 | 12 |
13 #include "webrtc/media/engine/webrtcvoe.h" | 13 #include "webrtc/media/engine/webrtcvoe.h" |
14 #include "webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h" | |
15 #include "webrtc/modules/audio_device/include/mock_audio_device.h" | 14 #include "webrtc/modules/audio_device/include/mock_audio_device.h" |
16 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 15 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
17 #include "webrtc/test/gmock.h" | 16 #include "webrtc/test/gmock.h" |
18 #include "webrtc/test/gtest.h" | 17 #include "webrtc/test/gtest.h" |
| 18 #include "webrtc/test/mock_audio_decoder_factory.h" |
19 #include "webrtc/voice_engine/transmit_mixer.h" | 19 #include "webrtc/voice_engine/transmit_mixer.h" |
20 | 20 |
21 namespace webrtc { | 21 namespace webrtc { |
22 namespace { | 22 namespace { |
23 | 23 |
24 constexpr AgcConfig kDefaultAgcConfig = { 3, 9, true }; | 24 constexpr AgcConfig kDefaultAgcConfig = { 3, 9, true }; |
25 | 25 |
26 struct TestHelper { | 26 struct TestHelper { |
27 TestHelper() { | 27 TestHelper() { |
28 // Reply with a 10ms timer every time TimeUntilNextProcess is called to | 28 // Reply with a 10ms timer every time TimeUntilNextProcess is called to |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 // TODO(solenberg): Move this test to a better place - added here for the sake | 275 // TODO(solenberg): Move this test to a better place - added here for the sake |
276 // of duplicating all relevant tests from audio_processing_test.cc. | 276 // of duplicating all relevant tests from audio_processing_test.cc. |
277 TEST(ApmHelpersTest, StereoSwapping_EnableDisable) { | 277 TEST(ApmHelpersTest, StereoSwapping_EnableDisable) { |
278 TestHelper helper; | 278 TestHelper helper; |
279 helper.transmit_mixer()->EnableStereoChannelSwapping(true); | 279 helper.transmit_mixer()->EnableStereoChannelSwapping(true); |
280 EXPECT_TRUE(helper.transmit_mixer()->IsStereoChannelSwappingEnabled()); | 280 EXPECT_TRUE(helper.transmit_mixer()->IsStereoChannelSwappingEnabled()); |
281 helper.transmit_mixer()->EnableStereoChannelSwapping(false); | 281 helper.transmit_mixer()->EnableStereoChannelSwapping(false); |
282 EXPECT_FALSE(helper.transmit_mixer()->IsStereoChannelSwappingEnabled()); | 282 EXPECT_FALSE(helper.transmit_mixer()->IsStereoChannelSwappingEnabled()); |
283 } | 283 } |
284 } // namespace webrtc | 284 } // namespace webrtc |
OLD | NEW |