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

Unified Diff: webrtc/call/call_perf_tests.cc

Issue 2652803002: Refactor FakeAudioDevice to have separate methods for starting recording and playout. (Closed)
Patch Set: Addressed review comments. Created 3 years, 11 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 | « no previous file | webrtc/test/BUILD.gn » ('j') | webrtc/test/fake_audio_device.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/call/call_perf_tests.cc
diff --git a/webrtc/call/call_perf_tests.cc b/webrtc/call/call_perf_tests.cc
index 782b45c9f273ffd6fe180fa59a2b49d2d5d914ee..6517c2a6603dacfc2e2fbe7e59a17eac95d5a79a 100644
--- a/webrtc/call/call_perf_tests.cc
+++ b/webrtc/call/call_perf_tests.cc
@@ -146,11 +146,8 @@ void CallPerfTest::TestAudioVideoSync(FecMode fec,
metrics::Reset();
VoiceEngine* voice_engine = VoiceEngine::Create();
VoEBase* voe_base = VoEBase::GetInterface(voice_engine);
- const std::string audio_filename =
- test::ResourcePath("voice_engine/audio_long16", "pcm");
- ASSERT_STRNE("", audio_filename.c_str());
- FakeAudioDevice fake_audio_device(Clock::GetRealTimeClock(), audio_filename,
- audio_rtp_speed);
+ FakeAudioDevice fake_audio_device(Clock::GetRealTimeClock(), audio_rtp_speed,
+ 48000);
EXPECT_EQ(0, voe_base->Init(&fake_audio_device, nullptr, decoder_factory_));
VoEBase::ChannelConfig config;
config.enable_voice_pacing = true;
@@ -264,7 +261,8 @@ void CallPerfTest::TestAudioVideoSync(FecMode fec,
Start();
- fake_audio_device.Start();
+ fake_audio_device.StartRecordingPulsedNoise(256);
+ fake_audio_device.StartPlayout();
audio_receive_stream->Start();
EXPECT_EQ(0, voe_base->StartSend(send_channel_id));
@@ -273,7 +271,8 @@ void CallPerfTest::TestAudioVideoSync(FecMode fec,
EXPECT_EQ(0, voe_base->StopSend(send_channel_id));
EXPECT_EQ(0, voe_base->StopPlayout(recv_channel_id));
- fake_audio_device.Stop();
+ fake_audio_device.StopRecording();
+ fake_audio_device.StopPlayout();
Stop();
video_send_transport.StopSending();
« no previous file with comments | « no previous file | webrtc/test/BUILD.gn » ('j') | webrtc/test/fake_audio_device.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698