Prevent howling in RunPlayoutAndRecordingInFullDuplex

The test RunPlayoutAndRecordingInFullDuplex makes the speakers play the
signal it simultaneously records from the microphone, which can cause
full howling.

The test itself measures buffer usage and does not depend on what signal
is played through the speakers. This change mutes the speakers to prevent
howling when running modules_unittests.

Bug: webrtc:10704
Change-Id: I6176adb2fb5ce0e4d86f6f447476be8a88c2f2cf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139889
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28140}
This commit is contained in:
Gustaf Ullberg
2019-06-03 15:03:02 +02:00
committed by Commit Bot
parent 15f2200266
commit 102b7289a9

View File

@ -1042,6 +1042,8 @@ TEST_P(AudioDeviceTest, RunPlayoutAndRecordingInFullDuplex) {
// (mainly on Windows) do not support mono.
EXPECT_EQ(0, audio_device()->SetStereoPlayout(true));
EXPECT_EQ(0, audio_device()->SetStereoRecording(true));
// Mute speakers to prevent howling.
EXPECT_EQ(0, audio_device()->SetSpeakerVolume(0));
StartPlayout();
StartRecording();
event()->Wait(static_cast<int>(