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

Unified Diff: webrtc/audio/test/low_bandwidth_audio_test.cc

Issue 2855163003: Add --quick flag to low bandwidth audio test (Closed)
Patch Set: Add comment Created 3 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/audio/test/low_bandwidth_audio_test.cc
diff --git a/webrtc/audio/test/low_bandwidth_audio_test.cc b/webrtc/audio/test/low_bandwidth_audio_test.cc
index f9e6e2b9d1fdaab12f0bfdc7ccfec7f8b486df26..070253e0a171b389663872f69ee6a5bdbfc18ac9 100644
--- a/webrtc/audio/test/low_bandwidth_audio_test.cc
+++ b/webrtc/audio/test/low_bandwidth_audio_test.cc
@@ -21,6 +21,10 @@
DEFINE_int32(sample_rate_hz, 16000,
"Sample rate (Hz) of the produced audio files.");
+DEFINE_bool(quick, false,
+ "Don't do the full audio recording. "
+ "Used to quickly check that the test runs without crashing.");
+
namespace {
// Wait half a second between stopping sending and stopping receiving audio.
@@ -106,10 +110,15 @@ void AudioQualityTest::ModifyAudioConfigs(
}
void AudioQualityTest::PerformTest() {
- // Wait until the input audio file is done...
- send_audio_device_->WaitForRecordingEnd();
- // and some extra time to account for network delay.
- SleepMs(GetNetworkPipeConfig().queue_delay_ms + kExtraRecordTimeMs);
+ if (FLAGS_quick) {
+ // Let the recording run for a small amount of time to check if it works.
+ SleepMs(1000);
+ } else {
+ // Wait until the input audio file is done...
+ send_audio_device_->WaitForRecordingEnd();
+ // and some extra time to account for network delay.
+ SleepMs(GetNetworkPipeConfig().queue_delay_ms + kExtraRecordTimeMs);
+ }
}
void AudioQualityTest::OnTestFinished() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698