webrtc/modules/audio_device
Anders Klemets eb8c4ca608 Remove unnecessary checks from AudioDeviceWindowsCore::CoreAudioIsSupported
This removes some code in the AudioDeviceWindowsCore::CoreAudioIsSupported function that was checking that every audio input and output device was functional. There are legitimate cases where some, or all, audio devices may not be accessible, and that was causing CoreAudioIsSupported to return false.

If CoreAudioIsSupported returns false, a subsequent RTC_CHECK call fails, which causes the entire app to exit.

After this change, the CoreAudioIsSupported() function simply checks if the Core Audio APIs are supported and no longer tries to do extra stuff unrelated to checking if the APIs are supported.

Note that Core Audio is actually supported in all versions of Windows after Windows XP. There were log messages in the code saying that if CoreAudioIsSupported() returns false, WebRTC will use the Wave Audio APIs instead. But this is no longer the case. The Wave Audio APIs would only be needed for Windows XP, and this code appears to have already been removed from WebRTC.
It is tempting to simply make CoreAudioIsSupported() do a "return true;" but for now I only removed the part of the logging messages that mentioned the Wave Audio APIs.

I understand that there is a new Audio Device Module (ADM) called WindowsCoreAudio2, which is now recommended for use by apps. Apps are supposed to instantiate WindowsCoreAudio2 and pass it in to WebRTC. When the app supplies its own ADM, CoreAudioIsSupported() does not get invoked, which avoids the bug. To help make it clearer that using WindowsCoreAudio2 is an acceptable solution, I am removing a comment that says that kWindowsCoreAudio2 is "experimental".

Bug: webrtc:11081
Change-Id: I7ed1684a276799f4c83006b45629e48814f0b18b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161463
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30025}
2019-12-06 10:09:03 +00:00
..
android Fix errorprone issues preventing Chromium Roll. 2019-11-27 12:52:48 +00:00
dummy Format almost everything. 2019-07-08 13:45:15 +00:00
include Remove unnecessary checks from AudioDeviceWindowsCore::CoreAudioIsSupported 2019-12-06 10:09:03 +00:00
linux [tsan] Guard audio_device_pulse_linux members from concurrent access. 2019-08-12 11:55:52 +00:00
mac Use std::make_unique instead of absl::make_unique. 2019-09-17 15:47:29 +00:00
win Remove unnecessary checks from AudioDeviceWindowsCore::CoreAudioIsSupported 2019-12-06 10:09:03 +00:00
audio_device_buffer.cc Format almost everything. 2019-07-08 13:45:15 +00:00
audio_device_buffer.h Format almost everything. 2019-07-08 13:45:15 +00:00
audio_device_config.h Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
audio_device_data_observer.cc Reporting audio device underrun counter 2019-08-16 11:49:55 +00:00
audio_device_generic.cc Reporting audio device underrun counter 2019-08-16 11:49:55 +00:00
audio_device_generic.h Reporting audio device underrun counter 2019-08-16 11:49:55 +00:00
audio_device_impl.cc Reporting audio device underrun counter 2019-08-16 11:49:55 +00:00
audio_device_impl.h Reporting audio device underrun counter 2019-08-16 11:49:55 +00:00
audio_device_name.cc Clarifies identification of default communication device in ADM2 2019-11-20 15:02:06 +00:00
audio_device_name.h Improves device enumeration in ADM2 for Windows. 2019-11-22 14:27:10 +00:00
audio_device_unittest.cc Tests that all available audio devices can be selected and used by the ADM. 2019-11-18 17:47:31 +00:00
BUILD.gn Move rtc_base/ignore_wundef.h to its own target. 2019-10-19 10:50:36 +00:00
DEPS Reland "Remove old audio device implementation." 2019-04-10 06:44:42 +00:00
fine_audio_buffer.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
fine_audio_buffer.h Adds stereo support to FineAudioBuffer for mobile platforms. 2018-04-24 11:58:54 +00:00
fine_audio_buffer_unittest.cc Format almost everything. 2019-07-08 13:45:15 +00:00
mock_audio_device_buffer.h Propagate TaskQueueFactory to AudioDeviceBuffer 2019-04-01 08:00:49 +00:00
OWNERS Moving src/webrtc into src/. 2017-09-15 04:25:06 +00:00