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

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

Issue 1111503003: Revert of Switch to STA mode for audio thread and WASAPI I/O streams. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « media/audio/audio_manager.cc ('k') | media/audio/audio_manager_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_manager_base.h" 5 #include "media/audio/audio_manager_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 max_num_input_streams_(kDefaultMaxInputStreams), 76 max_num_input_streams_(kDefaultMaxInputStreams),
77 num_output_streams_(0), 77 num_output_streams_(0),
78 num_input_streams_(0), 78 num_input_streams_(0),
79 // TODO(dalecurtis): Switch this to an ObserverListThreadSafe, so we don't 79 // TODO(dalecurtis): Switch this to an ObserverListThreadSafe, so we don't
80 // block the UI thread when swapping devices. 80 // block the UI thread when swapping devices.
81 output_listeners_( 81 output_listeners_(
82 ObserverList<AudioDeviceListener>::NOTIFY_EXISTING_ONLY), 82 ObserverList<AudioDeviceListener>::NOTIFY_EXISTING_ONLY),
83 audio_thread_("AudioThread"), 83 audio_thread_("AudioThread"),
84 audio_log_factory_(audio_log_factory) { 84 audio_log_factory_(audio_log_factory) {
85 #if defined(OS_WIN) 85 #if defined(OS_WIN)
86 // Do not use MTA mode initalization as it causes hangs for a significant 86 audio_thread_.init_com_with_mta(true);
87 // population of users and is not supported on Windows 8 for audio capture
88 // and rendering. See http://crbug.com/422522.
89 audio_thread_.init_com_with_mta(false);
90 #elif defined(OS_MACOSX) 87 #elif defined(OS_MACOSX)
91 // CoreAudio calls must occur on the main thread of the process, which in our 88 // CoreAudio calls must occur on the main thread of the process, which in our
92 // case is sadly the browser UI thread. Failure to execute calls on the right 89 // case is sadly the browser UI thread. Failure to execute calls on the right
93 // thread leads to crashes and odd behavior. See http://crbug.com/158170. 90 // thread leads to crashes and odd behavior. See http://crbug.com/158170.
94 // TODO(dalecurtis): We should require the message loop to be passed in. 91 // TODO(dalecurtis): We should require the message loop to be passed in.
95 if (base::MessageLoopForUI::IsCurrent()) { 92 if (base::MessageLoopForUI::IsCurrent()) {
96 task_runner_ = base::MessageLoopProxy::current(); 93 task_runner_ = base::MessageLoopProxy::current();
97 return; 94 return;
98 } 95 }
99 #endif 96 #endif
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 scoped_ptr<AudioLog> AudioManagerBase::CreateAudioLog( 398 scoped_ptr<AudioLog> AudioManagerBase::CreateAudioLog(
402 AudioLogFactory::AudioComponent component) { 399 AudioLogFactory::AudioComponent component) {
403 return audio_log_factory_->CreateAudioLog(component); 400 return audio_log_factory_->CreateAudioLog(component);
404 } 401 }
405 402
406 void AudioManagerBase::SetHasKeyboardMic() { 403 void AudioManagerBase::SetHasKeyboardMic() {
407 NOTREACHED(); 404 NOTREACHED();
408 } 405 }
409 406
410 } // namespace media 407 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_manager.cc ('k') | media/audio/audio_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698