webrtc/modules
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
..
audio_coding NetEq: Fix bug in PLC for multi-channel audio 2019-12-02 17:44:58 +00:00
audio_device Remove unnecessary checks from AudioDeviceWindowsCore::CoreAudioIsSupported 2019-12-06 10:09:03 +00:00
audio_mixer Use source_sets in component builds and static_library in release builds. 2019-10-17 21:17:18 +00:00
audio_processing Remove custom constructors for AudioProcessing::Config. 2019-12-06 06:49:04 +00:00
congestion_controller Apply network estimate by default. 2019-12-05 17:09:56 +00:00
desktop_capture Avoid capturing system UI over selected window 2019-12-05 19:13:03 +00:00
include Cleanup includes in modules/include/module_common_types.h 2019-10-07 16:06:26 +00:00
pacing TimeController: Rename Sleep to AdvanceTime. 2019-12-03 16:08:54 +00:00
remote_bitrate_estimator Apply network estimate by default. 2019-12-05 17:09:56 +00:00
rtp_rtcp Introduce VideoRtpDepacketizer interface to replace RtpDepacketizer 2019-12-05 15:05:30 +00:00
third_party Use source_sets in component builds and static_library in release builds. 2019-10-17 21:17:18 +00:00
utility Remove line number from rtc::Location 2019-12-03 19:43:12 +00:00
video_capture Add missing assert.h for win no-test build 2019-11-17 07:52:32 +00:00
video_coding VideoReceiveStream: Enable encoded frame sink. 2019-12-03 15:55:04 +00:00
video_processing Use source_sets in component builds and static_library in release builds. 2019-10-17 21:17:18 +00:00
BUILD.gn Reland "Refactoring of the noise suppressor and adding true multichannel support" 2019-10-31 11:56:01 +00:00
module_common_types_unittest.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
OWNERS Moving src/webrtc into src/. 2017-09-15 04:25:06 +00:00