diff options
author | tommi <tommi@chromium.org> | 2015-08-28 03:02:08 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-28 10:02:43 +0000 |
commit | 13c341a15d70751583937a2608ae82525010f7b3 (patch) | |
tree | 5b71bf0cb63bc2aac14b5423f8d7dcdea42c9db0 /media/audio/win/audio_low_latency_output_win.cc | |
parent | af0753a8ec04bd54f3234c9e5a899014a7e010ea (diff) | |
download | chromium_src-13c341a15d70751583937a2608ae82525010f7b3.zip chromium_src-13c341a15d70751583937a2608ae82525010f7b3.tar.gz chromium_src-13c341a15d70751583937a2608ae82525010f7b3.tar.bz2 |
Include default communication devices in audio device enumerations. This removes heuristic that picks the communications output device for rendering when associated with an active communications capture device. It also removes the goog specific constraint we offered to turn off ducking, since ducking will now always be turned off for the default device.
BUG=525443
Review URL: https://codereview.chromium.org/1314803003
Cr-Commit-Position: refs/heads/master@{#346113}
Diffstat (limited to 'media/audio/win/audio_low_latency_output_win.cc')
-rw-r--r-- | media/audio/win/audio_low_latency_output_win.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/media/audio/win/audio_low_latency_output_win.cc b/media/audio/win/audio_low_latency_output_win.cc index 494d1b1..c297acc 100644 --- a/media/audio/win/audio_low_latency_output_win.cc +++ b/media/audio/win/audio_low_latency_output_win.cc @@ -72,6 +72,12 @@ WASAPIAudioOutputStream::WASAPIAudioOutputStream(AudioManagerWin* manager, audio_bus_(AudioBus::Create(params)) { DCHECK(manager_); + // The empty string is used to indicate a default device and the + // |device_role_| member controls whether that's the default or default + // communications device. + DCHECK_NE(device_id_, AudioManagerBase::kDefaultDeviceId); + DCHECK_NE(device_id_, AudioManagerBase::kCommunicationsDeviceId); + DVLOG(1) << "WASAPIAudioOutputStream::WASAPIAudioOutputStream()"; DVLOG_IF(1, share_mode_ == AUDCLNT_SHAREMODE_EXCLUSIVE) << "Core Audio (WASAPI) EXCLUSIVE MODE is enabled."; @@ -140,8 +146,7 @@ bool WASAPIAudioOutputStream::Open() { // Create an IAudioClient interface for the default rendering IMMDevice. ScopedComPtr<IAudioClient> audio_client; - if (device_id_.empty() || - CoreAudioUtil::DeviceIsDefault(eRender, device_role_, device_id_)) { + if (device_id_.empty()) { audio_client = CoreAudioUtil::CreateDefaultClient(eRender, device_role_); communications_device = (device_role_ == eCommunications); } else { |