Reland: "Support audio channel count and sample rate changes on Windows."
Includes one line fix in audio_device_listener_win.cc to use the DCHECK_CALLED_ON_VALID_THREAD() macro. ----- [ Original Description ] ----- This fixes a TODO in AudioDeviceListenerWin on listening for property value changes... by listening for them in a completely different way. Unfortunately forcing mono audio for accessibility doesn't generate IMMNotificationClient events, so we need to instead use the IAudioSessionEvents interface, but that can only be hung off a fully initialized IAudioClient... which is only done during WASAPI audio output setup. So the original TODO is fixed by adding a 1-to-1 path for device changes (in addition to the 1-to-many path). We still need both paths since just switching your default device won't generate an IAudioSessionEvent notification, only an IMMNotificationClient event. Additionally fake and WaveOut based devices don't have a IAudioSessionEvents interface, so still need the old path. Misc other cleanups: - Expands the AudioDeviceListenerWin unit tests. - Fixes broken --force-wave-audio switch in AudioManagerWin. BUG=1020006 TEST=property changes, mono audio changes, default changes work. TBR=henrika, tguilbert Change-Id: I95f5f439982a68d2b509db10978a570fb98081b5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1931408Reviewed-by:Dale Curtis <dalecurtis@chromium.org> Reviewed-by:
Thomas Guilbert <tguilbert@chromium.org> Commit-Queue: Dale Curtis <dalecurtis@chromium.org> Cr-Commit-Position: refs/heads/master@{#718374}
Showing
Please register or sign in to comment