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: content/browser/renderer_host/media/audio_input_renderer_host.cc

Issue 11878032: Plumb |input_channels| all the way to AudioManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 | content/browser/renderer_host/media/audio_renderer_host.h » ('j') | no next file with comments »
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_input_renderer_host.h" 5 #include "content/browser/renderer_host/media/audio_input_renderer_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/process.h" 9 #include "base/process.h"
10 #include "base/shared_memory.h" 10 #include "base/shared_memory.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 if (LookupById(stream_id) != NULL) { 218 if (LookupById(stream_id) != NULL) {
219 SendErrorMessage(stream_id); 219 SendErrorMessage(stream_id);
220 return; 220 return;
221 } 221 }
222 222
223 media::AudioParameters audio_params(params); 223 media::AudioParameters audio_params(params);
224 224
225 if (media_stream_manager_->audio_input_device_manager()-> 225 if (media_stream_manager_->audio_input_device_manager()->
226 ShouldUseFakeDevice()) { 226 ShouldUseFakeDevice()) {
227 audio_params.Reset(media::AudioParameters::AUDIO_FAKE, 227 audio_params.Reset(media::AudioParameters::AUDIO_FAKE,
228 params.channel_layout(), params.sample_rate(), 228 params.channel_layout(), 0, params.sample_rate(),
229 params.bits_per_sample(), params.frames_per_buffer()); 229 params.bits_per_sample(), params.frames_per_buffer());
230 } 230 }
231 231
232 uint32 buffer_size = audio_params.GetBytesPerBuffer(); 232 uint32 buffer_size = audio_params.GetBytesPerBuffer();
233 233
234 // Create a new AudioEntry structure. 234 // Create a new AudioEntry structure.
235 scoped_ptr<AudioEntry> entry(new AudioEntry()); 235 scoped_ptr<AudioEntry> entry(new AudioEntry());
236 236
237 uint32 mem_size = sizeof(media::AudioInputBufferParameters) + buffer_size; 237 uint32 mem_size = sizeof(media::AudioInputBufferParameters) + buffer_size;
238 238
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 for (SessionEntryMap::iterator it = session_entries_.begin(); 456 for (SessionEntryMap::iterator it = session_entries_.begin();
457 it != session_entries_.end(); ++it) { 457 it != session_entries_.end(); ++it) {
458 if (stream_id == it->second) { 458 if (stream_id == it->second) {
459 return it->first; 459 return it->first;
460 } 460 }
461 } 461 }
462 return 0; 462 return 0;
463 } 463 }
464 464
465 } // namespace content 465 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/media/audio_renderer_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698