Commit c99d3a88 authored by henrika's avatar henrika Committed by Commit Bot

Adds support for audio capture-effect enumeration on Windows - part 2

Contains additional changes and improvements proposed after landing
by robliao@.

Bug: 1133643
Change-Id: Ib05e3878b70fc10fa5255645d4551639e2c96587
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2514423
Commit-Queue: Henrik Andreasson <henrika@chromium.org>
Reviewed-by: default avatarRobert Liao <robliao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823252}
parent dbe0ea06
......@@ -218,6 +218,10 @@ std::string GetOpenLogString(WASAPIAudioInputStream::StreamOpenResult result,
}
bool InitializeUWPSupport() {
// Place the actual body of the initialization in a lambda and store the
// result as a static since we don't expect this result to change between
// runs.
static const bool initialization_result = []() {
// Windows.Media.Effects and Windows.Media.Devices requires Windows 10 build
// 10.0.10240.0.
if (base::win::GetVersion() < base::win::Version::WIN10) {
......@@ -237,6 +241,9 @@ bool InitializeUWPSupport() {
return false;
}
return true;
}();
return initialization_result;
}
} // namespace
......@@ -1169,7 +1176,7 @@ HRESULT WASAPIAudioInputStream::GetAudioCaptureEffects(
}
return hr;
} // namespace media
}
HRESULT WASAPIAudioInputStream::SetCommunicationsCategoryAndRawCaptureMode() {
DCHECK(audio_client_.Get());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment