Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(557)

Unified Diff: media/audio/win/core_audio_util_win.cc

Issue 1091093002: Partial revert of disabling low latency audio for remote desktop. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/win/core_audio_util_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/win/core_audio_util_win.cc
diff --git a/media/audio/win/core_audio_util_win.cc b/media/audio/win/core_audio_util_win.cc
index b3bc62fb8bc867c1a08275461d8d966453090d85..53530dfc998382d46ef6cbaf26031d1493ee0a79 100644
--- a/media/audio/win/core_audio_util_win.cc
+++ b/media/audio/win/core_audio_util_win.cc
@@ -187,24 +187,6 @@ static ScopedComPtr<IMMDeviceEnumerator> CreateDeviceEnumeratorInternal() {
return device_enumerator;
}
-static bool IsRemoteSession() {
- return !!GetSystemMetrics(SM_REMOTESESSION);
-}
-
-static bool IsRemoteDeviceInternal(IMMDevice* device) {
- DCHECK(IsRemoteSession());
-
- std::string device_name;
- HRESULT hr = GetDeviceFriendlyNameInternal(device, &device_name);
-
- // This method should only be called if IsRemoteSession() is true, so assume
- // we have a remote audio device if we can't tell.
- if (FAILED(hr))
- return true;
-
- return device_name == "Remote Audio";
-}
-
static bool IsSupportedInternal() {
// It is possible to force usage of WaveXxx APIs by using a command line flag.
const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
@@ -241,26 +223,7 @@ static bool IsSupportedInternal() {
return false;
}
- // Don't use CoreAudio when a remote desktop session with remote audio is
- // present; several users report only WaveAudio working for them and crash
- // reports show hangs when calling into the OS for CoreAudio API calls. See
- // http://crbug.com/422522 and http://crbug.com/180591.
- //
- // Note: There's another check in WASAPIAudioOutputStream::Open() for the case
- // where a remote session is created after Chrome has been started. Graceful
- // fallback to WaveOut will occur in this case via AudioOutputResampler.
- if (!IsRemoteSession())
- return true;
-
- ScopedComPtr<IMMDevice> device;
- HRESULT hr = device_enumerator->GetDefaultAudioEndpoint(eRender, eConsole,
- device.Receive());
-
- // Assume remote audio playback if we can't tell.
- if (FAILED(hr))
- return false;
-
- return !IsRemoteDeviceInternal(device.get());
+ return true;
}
bool CoreAudioUtil::IsSupported() {
@@ -906,15 +869,4 @@ bool CoreAudioUtil::FillRenderEndpointBufferWithSilence(
AUDCLNT_BUFFERFLAGS_SILENT));
}
-bool CoreAudioUtil::IsRemoteOutputDevice(const std::string& device_id) {
- DCHECK(IsSupported());
- if (!IsRemoteSession())
- return false;
- ScopedComPtr<IMMDevice> device(device_id.empty()
- ? CreateDefaultDevice(eRender, eConsole)
- : CreateDevice(device_id));
- // Assume remote audio if we can't tell.
- return device ? IsRemoteDeviceInternal(device.get()) : true;
-}
-
} // namespace media
« no previous file with comments | « media/audio/win/core_audio_util_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698