From 102b7289a9f2db72f74884a7788605187a2ddfee Mon Sep 17 00:00:00 2001 From: Gustaf Ullberg Date: Mon, 3 Jun 2019 15:03:02 +0200 Subject: [PATCH] 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 Commit-Queue: Gustaf Ullberg Cr-Commit-Position: refs/heads/master@{#28140} --- modules/audio_device/audio_device_unittest.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/audio_device/audio_device_unittest.cc b/modules/audio_device/audio_device_unittest.cc index 7fd00c4b0c..ffecf8e13c 100644 --- a/modules/audio_device/audio_device_unittest.cc +++ b/modules/audio_device/audio_device_unittest.cc @@ -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(