summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-27 12:22:05 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-27 12:22:05 +0000
commit69e62d3c37e1e150bf480a41322e716299fd74ea (patch)
tree6b85628a761780397d0c8212356144952845a71d
parentabd7c675593dfb35872e2de9aada9dc79a38f4b7 (diff)
downloadchromium_src-69e62d3c37e1e150bf480a41322e716299fd74ea.zip
chromium_src-69e62d3c37e1e150bf480a41322e716299fd74ea.tar.gz
chromium_src-69e62d3c37e1e150bf480a41322e716299fd74ea.tar.bz2
Merge 235170 "Don't stop/restart a stream that already has the c..."
> Don't stop/restart a stream that already has the correct output device. > > This prevents an audible audio glitch when setting the audio output > device ID for a tab with multiple open streams. Before this change, > there would be an audible gap in all streams. After this change, there > is no audible glitch for streams already playing via the correct > device. > > This is also a minimal change to enable a JavaScript-based workaround > to issue 317900, the workaround being that you can call setActiveSink > repeatedly without any negative consequence. > > TBR=tommi@chromium.org > BUG=298158,317900 > > Review URL: https://codereview.chromium.org/68523013 TBR=joi@chromium.org Review URL: https://codereview.chromium.org/90753004 git-svn-id: svn://svn.chromium.org/chrome/branches/1700/src@237561 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--media/audio/audio_output_controller.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/media/audio/audio_output_controller.cc b/media/audio/audio_output_controller.cc
index 4f008c9..e3a8178 100644
--- a/media/audio/audio_output_controller.cc
+++ b/media/audio/audio_output_controller.cc
@@ -293,6 +293,9 @@ void AudioOutputController::DoSwitchOutputDevice(
if (state_ == kClosed)
return;
+ if (output_device_id == output_device_id_)
+ return;
+
output_device_id_ = output_device_id;
// If output is currently diverted, we must not call OnDeviceChange