Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_proxy.h" | 12 #include "media/audio/audio_output_proxy.h" |
| 13 #include "media/audio/audio_output_resampler.h" | |
| 13 #include "media/audio/fake_audio_input_stream.h" | 14 #include "media/audio/fake_audio_input_stream.h" |
| 14 #include "media/audio/fake_audio_output_stream.h" | 15 #include "media/audio/fake_audio_output_stream.h" |
| 15 #include "media/base/media_switches.h" | 16 #include "media/base/media_switches.h" |
| 16 | 17 |
| 17 // TODO(dalecurtis): Temporarily disabled while switching pipeline to use float, | 18 // TODO(dalecurtis): Temporarily disabled while switching pipeline to use float, |
| 18 // http://crbug.com/114700 | 19 // http://crbug.com/114700 |
| 19 #if defined(ENABLE_AUDIO_MIXER) | 20 #if defined(ENABLE_AUDIO_MIXER) |
| 20 #include "media/audio/audio_output_mixer.h" | 21 #include "media/audio/audio_output_mixer.h" |
| 21 #endif | 22 #endif |
| 22 | 23 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 154 base::TimeDelta::FromSeconds(kStreamCloseDelaySeconds); | 155 base::TimeDelta::FromSeconds(kStreamCloseDelaySeconds); |
| 155 // TODO(dalecurtis): Browser side mixing has a couple issues that must be | 156 // TODO(dalecurtis): Browser side mixing has a couple issues that must be |
| 156 // fixed before it can be turned on by default: http://crbug.com/138098 and | 157 // fixed before it can be turned on by default: http://crbug.com/138098 and |
| 157 // http://crbug.com/140247 | 158 // http://crbug.com/140247 |
| 158 #if defined(ENABLE_AUDIO_MIXER) | 159 #if defined(ENABLE_AUDIO_MIXER) |
| 159 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 160 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
| 160 if (cmd_line->HasSwitch(switches::kEnableAudioMixer)) | 161 if (cmd_line->HasSwitch(switches::kEnableAudioMixer)) |
| 161 dispatcher = new AudioOutputMixer(this, params, close_delay); | 162 dispatcher = new AudioOutputMixer(this, params, close_delay); |
| 162 else | 163 else |
| 163 #endif | 164 #endif |
| 164 dispatcher = new AudioOutputDispatcherImpl(this, params, close_delay); | 165 //dispatcher = new AudioOutputDispatcherImpl(this, params, close_delay); |
|
scherkus (not reviewing)
2012/09/07 13:30:16
remove or is this supposed to be a flag?
DaleCurtis
2012/09/07 14:17:35
Good question. I think it'll be removed. Should pr
DaleCurtis
2012/09/10 12:06:24
Done.
| |
| 166 dispatcher = new AudioOutputResampler(this, params, close_delay); | |
| 165 } | 167 } |
| 166 return new AudioOutputProxy(dispatcher); | 168 return new AudioOutputProxy(dispatcher); |
| 167 #endif // defined(OS_IOS) | 169 #endif // defined(OS_IOS) |
| 168 } | 170 } |
| 169 | 171 |
| 170 bool AudioManagerBase::CanShowAudioInputSettings() { | 172 bool AudioManagerBase::CanShowAudioInputSettings() { |
| 171 return false; | 173 return false; |
| 172 } | 174 } |
| 173 | 175 |
| 174 void AudioManagerBase::ShowAudioInputSettings() { | 176 void AudioManagerBase::ShowAudioInputSettings() { |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 253 DCHECK(dispatcher->HasOneRef()) << "AudioOutputProxies are still alive"; | 255 DCHECK(dispatcher->HasOneRef()) << "AudioOutputProxies are still alive"; |
| 254 dispatcher = NULL; | 256 dispatcher = NULL; |
| 255 } | 257 } |
| 256 } | 258 } |
| 257 | 259 |
| 258 output_dispatchers_.clear(); | 260 output_dispatchers_.clear(); |
| 259 #endif // defined(OS_IOS) | 261 #endif // defined(OS_IOS) |
| 260 } | 262 } |
| 261 | 263 |
| 262 } // namespace media | 264 } // namespace media |
| OLD | NEW |