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

Unified Diff: content/browser/renderer_host/media/audio_input_renderer_host.cc

Issue 9655018: Make AudioParameters a class instead of a struct (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright years Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/media/audio_input_renderer_host.cc
diff --git a/content/browser/renderer_host/media/audio_input_renderer_host.cc b/content/browser/renderer_host/media/audio_input_renderer_host.cc
index 149d4b8b12fd64f9a3f6913d8f75ed91a9567f27..031f520c28bfac5f11429db94677fc8af4d5c6f0 100644
--- a/content/browser/renderer_host/media/audio_input_renderer_host.cc
+++ b/content/browser/renderer_host/media/audio_input_renderer_host.cc
@@ -208,15 +208,15 @@ void AudioInputRendererHost::OnCreateStream(int stream_id,
AudioParameters audio_params(params);
- DCHECK_GT(audio_params.samples_per_packet, 0);
- uint32 packet_size = audio_params.GetPacketSize();
+ DCHECK_GT(audio_params.frames_per_buffer(), 0);
+ uint32 buffer_size = audio_params.GetBytesPerBuffer();
// Create a new AudioEntry structure.
scoped_ptr<AudioEntry> entry(new AudioEntry());
// Create the shared memory and share it with the renderer process
// using a new SyncWriter object.
- if (!entry->shared_memory.CreateAndMapAnonymous(packet_size)) {
+ if (!entry->shared_memory.CreateAndMapAnonymous(buffer_size)) {
// If creation of shared memory failed then send an error message.
SendErrorMessage(stream_id);
return;

Powered by Google App Engine
This is Rietveld 408576698