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

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

Issue 10855086: Disable AudioOutputMixer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | media/audio/audio_output_mixer.h » ('j') | media/audio/audio_output_mixer.h » ('J')
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/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
11 #include "media/audio/audio_output_dispatcher_impl.h" 11 #include "media/audio/audio_output_dispatcher_impl.h"
12 #include "media/audio/audio_output_mixer.h" 12 // TODO(dalecurtis): Temporarily disabled while switching over to floats.
13 // #include "media/audio/audio_output_mixer.h"
scherkus (not reviewing) 2012/08/09 22:12:39 this is better handled via an #ifdef i.e., after
DaleCurtis 2012/08/09 22:46:29 Done.
13 #include "media/audio/audio_output_proxy.h" 14 #include "media/audio/audio_output_proxy.h"
14 #include "media/audio/fake_audio_input_stream.h" 15 #include "media/audio/fake_audio_input_stream.h"
15 #include "media/audio/fake_audio_output_stream.h" 16 #include "media/audio/fake_audio_output_stream.h"
16 #include "media/base/media_switches.h" 17 #include "media/base/media_switches.h"
17 18
18 namespace media { 19 namespace media {
19 20
20 static const int kStreamCloseDelaySeconds = 5; 21 static const int kStreamCloseDelaySeconds = 5;
21 22
22 // Default maximum number of output streams that can be open simultaneously 23 // Default maximum number of output streams that can be open simultaneously
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 136
136 AudioOutputStream* AudioManagerBase::MakeAudioOutputStreamProxy( 137 AudioOutputStream* AudioManagerBase::MakeAudioOutputStreamProxy(
137 const AudioParameters& params) { 138 const AudioParameters& params) {
138 DCHECK(GetMessageLoop()->BelongsToCurrentThread()); 139 DCHECK(GetMessageLoop()->BelongsToCurrentThread());
139 140
140 scoped_refptr<AudioOutputDispatcher>& dispatcher = 141 scoped_refptr<AudioOutputDispatcher>& dispatcher =
141 output_dispatchers_[params]; 142 output_dispatchers_[params];
142 if (!dispatcher) { 143 if (!dispatcher) {
143 base::TimeDelta close_delay = 144 base::TimeDelta close_delay =
144 base::TimeDelta::FromSeconds(kStreamCloseDelaySeconds); 145 base::TimeDelta::FromSeconds(kStreamCloseDelaySeconds);
145 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 146 // TODO(dalecurtis): Temporarily disabled while switching over to floats.
scherkus (not reviewing) 2012/08/09 22:12:39 link to bug?
DaleCurtis 2012/08/09 22:46:29 Done.
146 // TODO(dalecurtis): Browser side mixing has a couple issues that must be 147 // TODO(dalecurtis): Browser side mixing has a couple issues that must be
147 // fixed before it can be turned on by default: http://crbug.com/138098 and 148 // fixed before it can be turned on by default: http://crbug.com/138098 and
148 // http://crbug.com/140247 149 // http://crbug.com/140247
149 if (cmd_line->HasSwitch(switches::kEnableAudioMixer)) { 150 // const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
150 dispatcher = new AudioOutputMixer(this, params, close_delay); 151 // if (cmd_line->HasSwitch(switches::kEnableAudioMixer))
151 } else { 152 // dispatcher = new AudioOutputMixer(this, params, close_delay);
152 dispatcher = new AudioOutputDispatcherImpl(this, params, close_delay); 153 // else
153 } 154 dispatcher = new AudioOutputDispatcherImpl(this, params, close_delay);
154 } 155 }
155 return new AudioOutputProxy(dispatcher); 156 return new AudioOutputProxy(dispatcher);
156 } 157 }
157 158
158 bool AudioManagerBase::CanShowAudioInputSettings() { 159 bool AudioManagerBase::CanShowAudioInputSettings() {
159 return false; 160 return false;
160 } 161 }
161 162
162 void AudioManagerBase::ShowAudioInputSettings() { 163 void AudioManagerBase::ShowAudioInputSettings() {
163 } 164 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 // So, better crash now than later. 237 // So, better crash now than later.
237 DCHECK(dispatcher->HasOneRef()) << "AudioOutputProxies are still alive"; 238 DCHECK(dispatcher->HasOneRef()) << "AudioOutputProxies are still alive";
238 dispatcher = NULL; 239 dispatcher = NULL;
239 } 240 }
240 } 241 }
241 242
242 output_dispatchers_.clear(); 243 output_dispatchers_.clear();
243 } 244 }
244 245
245 } // namespace media 246 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/audio/audio_output_mixer.h » ('j') | media/audio/audio_output_mixer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698