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

Side by Side Diff: content/browser/renderer_host/media/audio_renderer_host.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: Switch argument order in AudioOutputController for consistency 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
« no previous file with comments | « no previous file | media/audio/audio_manager_base.cc » ('j') | media/audio/audio_output_controller.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 "content/browser/renderer_host/media/audio_renderer_host.h" 5 #include "content/browser/renderer_host/media/audio_renderer_host.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/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 AudioRendererHost::AudioEntry::AudioEntry( 88 AudioRendererHost::AudioEntry::AudioEntry(
89 AudioRendererHost* host, int stream_id, int render_view_id, 89 AudioRendererHost* host, int stream_id, int render_view_id,
90 const media::AudioParameters& params, 90 const media::AudioParameters& params,
91 const std::string& input_device_id, 91 const std::string& input_device_id,
92 scoped_ptr<base::SharedMemory> shared_memory, 92 scoped_ptr<base::SharedMemory> shared_memory,
93 scoped_ptr<media::AudioOutputController::SyncReader> reader) 93 scoped_ptr<media::AudioOutputController::SyncReader> reader)
94 : host_(host), 94 : host_(host),
95 stream_id_(stream_id), 95 stream_id_(stream_id),
96 render_view_id_(render_view_id), 96 render_view_id_(render_view_id),
97 controller_(media::AudioOutputController::Create( 97 controller_(media::AudioOutputController::Create(
98 host->audio_manager_, this, params, input_device_id, reader.get())), 98 // TODO(tommi): Feed in the proper output device id.
99 host->audio_manager_, this, params, std::string(),
100 input_device_id, reader.get())),
99 shared_memory_(shared_memory.Pass()), 101 shared_memory_(shared_memory.Pass()),
100 reader_(reader.Pass()) { 102 reader_(reader.Pass()) {
101 DCHECK(controller_.get()); 103 DCHECK(controller_.get());
102 } 104 }
103 105
104 AudioRendererHost::AudioEntry::~AudioEntry() {} 106 AudioRendererHost::AudioEntry::~AudioEntry() {}
105 107
106 /////////////////////////////////////////////////////////////////////////////// 108 ///////////////////////////////////////////////////////////////////////////////
107 // AudioRendererHost implementations. 109 // AudioRendererHost implementations.
108 AudioRendererHost::AudioRendererHost( 110 AudioRendererHost::AudioRendererHost(
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 } 472 }
471 473
472 AudioRendererHost::AudioEntry* AudioRendererHost::LookupById(int stream_id) { 474 AudioRendererHost::AudioEntry* AudioRendererHost::LookupById(int stream_id) {
473 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 475 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
474 476
475 AudioEntryMap::const_iterator i = audio_entries_.find(stream_id); 477 AudioEntryMap::const_iterator i = audio_entries_.find(stream_id);
476 return i != audio_entries_.end() ? i->second : NULL; 478 return i != audio_entries_.end() ? i->second : NULL;
477 } 479 }
478 480
479 } // namespace content 481 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/audio/audio_manager_base.cc » ('j') | media/audio/audio_output_controller.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698