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

Unified Diff: webrtc/call/call_perf_tests.cc

Issue 2652803002: Refactor FakeAudioDevice to have separate methods for starting recording and playout. (Closed)
Patch Set: Fix bug with sample size. 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..e31ec71f3faf84b2e845f56d2f9a77eb23dc5da1 100644
--- a/webrtc/call/call_perf_tests.cc
+++ b/webrtc/call/call_perf_tests.cc
@@ -146,11 +146,7 @@ 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);
EXPECT_EQ(0, voe_base->Init(&fake_audio_device, nullptr, decoder_factory_));
VoEBase::ChannelConfig config;
config.enable_voice_pacing = true;
@@ -264,7 +260,8 @@ void CallPerfTest::TestAudioVideoSync(FecMode fec,
Start();
- fake_audio_device.Start();
+ fake_audio_device.StartRecordingSine(1000, 256);
+ fake_audio_device.StartPlayout();
audio_receive_stream->Start();
EXPECT_EQ(0, voe_base->StartSend(send_channel_id));
@@ -273,7 +270,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