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

Side by Side Diff: media/audio/audio_output_dispatcher_impl.cc

Issue 190553004: Revert "Attempt to fix audio wedges by restarting all streams on OSX." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/audio/audio_output_dispatcher_impl.h ('k') | media/audio/audio_output_proxy_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/audio/audio_output_dispatcher_impl.h" 5 #include "media/audio/audio_output_dispatcher_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 stream->Close(); 161 stream->Close();
162 162
163 AudioStreamIDMap::iterator it = audio_stream_ids_.find(stream); 163 AudioStreamIDMap::iterator it = audio_stream_ids_.find(stream);
164 DCHECK(it != audio_stream_ids_.end()); 164 DCHECK(it != audio_stream_ids_.end());
165 audio_log_->OnClosed(it->second); 165 audio_log_->OnClosed(it->second);
166 audio_stream_ids_.erase(it); 166 audio_stream_ids_.erase(it);
167 } 167 }
168 idle_streams_.erase(idle_streams_.begin() + keep_alive, idle_streams_.end()); 168 idle_streams_.erase(idle_streams_.begin() + keep_alive, idle_streams_.end());
169 } 169 }
170 170
171 void AudioOutputDispatcherImpl::CloseStreamsForWedgeFix() {
172 DCHECK(task_runner_->BelongsToCurrentThread());
173 CloseAllIdleStreams();
174 }
175
176 void AudioOutputDispatcherImpl::RestartStreamsForWedgeFix() {
177 DCHECK(task_runner_->BelongsToCurrentThread());
178
179 // Should only be called when the dispatcher is used with fake streams which
180 // don't need to be shutdown or restarted.
181 CHECK_EQ(params_.format(), AudioParameters::AUDIO_FAKE);
182 }
183
184 } // namespace media 171 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_output_dispatcher_impl.h ('k') | media/audio/audio_output_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698