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

Unified Diff: webrtc/test/call_test.cc

Issue 2961723004: Allow an external audio processing module to be used in WebRTC (Closed)
Patch Set: Moved creation of APMs from CreateVoiceEngines Created 3 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/test/call_test.h ('k') | webrtc/test/mock_voice_engine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/call_test.cc
diff --git a/webrtc/test/call_test.cc b/webrtc/test/call_test.cc
index 6e665cf6ed0e14aec6c4bc85dc27d3c4b23a5cfc..638e70483a1bccaa48f775cffb1c88fc4096a51f 100644
--- a/webrtc/test/call_test.cc
+++ b/webrtc/test/call_test.cc
@@ -56,10 +56,13 @@ void CallTest::RunBaseTest(BaseTest* test) {
CreateFakeAudioDevices(test->CreateCapturer(), test->CreateRenderer());
test->OnFakeAudioDevicesCreated(fake_send_audio_device_.get(),
fake_recv_audio_device_.get());
+ apm_send_ = AudioProcessing::Create();
+ apm_recv_ = AudioProcessing::Create();
CreateVoiceEngines();
AudioState::Config audio_state_config;
audio_state_config.voice_engine = voe_send_.voice_engine;
audio_state_config.audio_mixer = AudioMixerImpl::Create();
+ audio_state_config.audio_processing = apm_send_;
send_config.audio_state = AudioState::Create(audio_state_config);
}
CreateSenderCall(send_config);
@@ -69,6 +72,7 @@ void CallTest::RunBaseTest(BaseTest* test) {
AudioState::Config audio_state_config;
audio_state_config.voice_engine = voe_recv_.voice_engine;
audio_state_config.audio_mixer = AudioMixerImpl::Create();
+ audio_state_config.audio_processing = apm_recv_;
recv_config.audio_state = AudioState::Create(audio_state_config);
}
CreateReceiverCall(recv_config);
@@ -378,8 +382,8 @@ void CallTest::DestroyStreams() {
void CallTest::CreateVoiceEngines() {
voe_send_.voice_engine = VoiceEngine::Create();
voe_send_.base = VoEBase::GetInterface(voe_send_.voice_engine);
- EXPECT_EQ(0, voe_send_.base->Init(fake_send_audio_device_.get(), nullptr,
- decoder_factory_));
+ EXPECT_EQ(0, voe_send_.base->Init(fake_send_audio_device_.get(),
+ apm_send_.get(), decoder_factory_));
VoEBase::ChannelConfig config;
config.enable_voice_pacing = true;
voe_send_.channel_id = voe_send_.base->CreateChannel(config);
@@ -387,8 +391,8 @@ void CallTest::CreateVoiceEngines() {
voe_recv_.voice_engine = VoiceEngine::Create();
voe_recv_.base = VoEBase::GetInterface(voe_recv_.voice_engine);
- EXPECT_EQ(0, voe_recv_.base->Init(fake_recv_audio_device_.get(), nullptr,
- decoder_factory_));
+ EXPECT_EQ(0, voe_recv_.base->Init(fake_recv_audio_device_.get(),
+ apm_recv_.get(), decoder_factory_));
voe_recv_.channel_id = voe_recv_.base->CreateChannel();
EXPECT_GE(voe_recv_.channel_id, 0);
}
« no previous file with comments | « webrtc/test/call_test.h ('k') | webrtc/test/mock_voice_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698