Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: webrtc/audio/audio_state_unittest.cc

Issue 2469743002: Passed AudioMixer to AudioState::Config. (Closed)
Patch Set: Rebase. GYP removed! Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/audio/audio_state.cc ('k') | webrtc/call/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <memory> 11 #include <memory>
12 12
13 #include "webrtc/audio/audio_state.h" 13 #include "webrtc/audio/audio_state.h"
14 #include "webrtc/modules/audio_mixer/audio_mixer_impl.h"
14 #include "webrtc/test/gtest.h" 15 #include "webrtc/test/gtest.h"
15 #include "webrtc/test/mock_voice_engine.h" 16 #include "webrtc/test/mock_voice_engine.h"
16 17
17 namespace webrtc { 18 namespace webrtc {
18 namespace test { 19 namespace test {
19 namespace { 20 namespace {
20 21
21 struct ConfigHelper { 22 struct ConfigHelper {
22 ConfigHelper() { 23 ConfigHelper() {
23 EXPECT_CALL(voice_engine_, 24 EXPECT_CALL(voice_engine_,
24 RegisterVoiceEngineObserver(testing::_)).WillOnce(testing::Return(0)); 25 RegisterVoiceEngineObserver(testing::_)).WillOnce(testing::Return(0));
25 EXPECT_CALL(voice_engine_, 26 EXPECT_CALL(voice_engine_,
26 DeRegisterVoiceEngineObserver()).WillOnce(testing::Return(0)); 27 DeRegisterVoiceEngineObserver()).WillOnce(testing::Return(0));
27 EXPECT_CALL(voice_engine_, audio_device_module()); 28 EXPECT_CALL(voice_engine_, audio_device_module());
28 EXPECT_CALL(voice_engine_, audio_processing()); 29 EXPECT_CALL(voice_engine_, audio_processing());
29 EXPECT_CALL(voice_engine_, audio_transport()); 30 EXPECT_CALL(voice_engine_, audio_transport());
30 31
31 config_.voice_engine = &voice_engine_; 32 config_.voice_engine = &voice_engine_;
33 config_.audio_mixer = AudioMixerImpl::Create();
32 } 34 }
33 AudioState::Config& config() { return config_; } 35 AudioState::Config& config() { return config_; }
34 MockVoiceEngine& voice_engine() { return voice_engine_; } 36 MockVoiceEngine& voice_engine() { return voice_engine_; }
35 37
36 private: 38 private:
37 testing::StrictMock<MockVoiceEngine> voice_engine_; 39 testing::StrictMock<MockVoiceEngine> voice_engine_;
38 AudioState::Config config_; 40 AudioState::Config config_;
39 }; 41 };
40 } // namespace 42 } // namespace
41 43
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 uint32_t new_mic_level; 112 uint32_t new_mic_level;
111 EXPECT_CALL(original_audio_transport, 113 EXPECT_CALL(original_audio_transport,
112 RecordedDataIsAvailable(nullptr, 80, 2, 1, 8000, 0, 0, 0, false, 114 RecordedDataIsAvailable(nullptr, 80, 2, 1, 8000, 0, 0, 0, false,
113 testing::Ref(new_mic_level))); 115 testing::Ref(new_mic_level)));
114 116
115 audio_transport_proxy->RecordedDataIsAvailable(nullptr, 80, 2, 1, 8000, 0, 0, 117 audio_transport_proxy->RecordedDataIsAvailable(nullptr, 80, 2, 1, 8000, 0, 0,
116 0, false, new_mic_level); 118 0, false, new_mic_level);
117 } 119 }
118 } // namespace test 120 } // namespace test
119 } // namespace webrtc 121 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/audio/audio_state.cc ('k') | webrtc/call/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698