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

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

Issue 10918098: Introduce AudioOutputResampler for browser side resampling. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: First draft! Created 8 years, 3 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
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_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
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
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
OLDNEW
« no previous file with comments | « no previous file | media/audio/audio_output_resampler.h » ('j') | media/audio/audio_output_resampler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698