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

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

Issue 23466008: Wire up the output device id and provide an implementation on Windows. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update comments Created 7 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/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 if (it != output_dispatchers_.end()) { 286 if (it != output_dispatchers_.end()) {
287 delete dispatcher_params; 287 delete dispatcher_params;
288 return new AudioOutputProxy((*it)->dispatcher.get()); 288 return new AudioOutputProxy((*it)->dispatcher.get());
289 } 289 }
290 290
291 const base::TimeDelta kCloseDelay = 291 const base::TimeDelta kCloseDelay =
292 base::TimeDelta::FromSeconds(kStreamCloseDelaySeconds); 292 base::TimeDelta::FromSeconds(kStreamCloseDelaySeconds);
293 scoped_refptr<AudioOutputDispatcher> dispatcher; 293 scoped_refptr<AudioOutputDispatcher> dispatcher;
294 if (output_params.format() != AudioParameters::AUDIO_FAKE) { 294 if (output_params.format() != AudioParameters::AUDIO_FAKE) {
295 dispatcher = new AudioOutputResampler(this, params, output_params, 295 dispatcher = new AudioOutputResampler(this, params, output_params,
296 input_device_id, kCloseDelay); 296 output_device_id, input_device_id,
297 kCloseDelay);
297 } else { 298 } else {
298 dispatcher = new AudioOutputDispatcherImpl(this, output_params, 299 dispatcher = new AudioOutputDispatcherImpl(this, output_params,
300 output_device_id,
299 input_device_id, kCloseDelay); 301 input_device_id, kCloseDelay);
300 } 302 }
301 303
302 dispatcher_params->dispatcher = dispatcher; 304 dispatcher_params->dispatcher = dispatcher;
303 output_dispatchers_.push_back(dispatcher_params); 305 output_dispatchers_.push_back(dispatcher_params);
304 return new AudioOutputProxy(dispatcher.get()); 306 return new AudioOutputProxy(dispatcher.get());
305 #endif // defined(OS_IOS) 307 #endif // defined(OS_IOS)
306 } 308 }
307 309
308 void AudioManagerBase::ShowAudioInputSettings() { 310 void AudioManagerBase::ShowAudioInputSettings() {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 NOTIMPLEMENTED(); 423 NOTIMPLEMENTED();
422 return ""; 424 return "";
423 } 425 }
424 426
425 std::string AudioManagerBase::GetDefaultOutputDeviceID() { 427 std::string AudioManagerBase::GetDefaultOutputDeviceID() {
426 NOTIMPLEMENTED(); 428 NOTIMPLEMENTED();
427 return ""; 429 return "";
428 } 430 }
429 431
430 } // namespace media 432 } // namespace media
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/audio_renderer_host.cc ('k') | media/audio/audio_output_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698