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 baa8a744399a4e899154a6763cbbe45758e7d95e..50e4119ddf878aa20f9047bdca19c16f53050d9e 100644 |
--- a/content/browser/renderer_host/media/audio_input_renderer_host.cc |
+++ b/content/browser/renderer_host/media/audio_input_renderer_host.cc |
@@ -17,6 +17,9 @@ |
#include "content/browser/renderer_host/media/audio_input_sync_writer.h" |
#include "content/browser/renderer_host/media/media_stream_manager.h" |
#include "media/audio/audio_manager_base.h" |
+#include "media/base/audio_bus.h" |
+ |
+using media::AudioBus; |
DaleCurtis
2014/06/10 17:03:14
I'd drop this, you don't see much content code doi
henrika (OOO until Aug 14)
2014/06/12 12:00:33
Done.
|
namespace content { |
@@ -113,8 +116,7 @@ void AudioInputRendererHost::OnError(media::AudioInputController* controller, |
} |
void AudioInputRendererHost::OnData(media::AudioInputController* controller, |
- const uint8* data, |
- uint32 size) { |
+ const media::AudioBus* data) { |
NOTREACHED() << "Only low-latency mode is supported."; |
} |
@@ -293,7 +295,7 @@ void AudioInputRendererHost::OnCreateStream( |
scoped_ptr<AudioEntry> entry(new AudioEntry()); |
const uint32 segment_size = (sizeof(media::AudioInputBufferParameters) + |
- audio_params.GetBytesPerBuffer()); |
+ AudioBus::CalculateMemorySize(audio_params)); |
entry->shared_memory_segment_count = config.shared_memory_count; |
// Create the shared memory and share it with the renderer process |
@@ -307,9 +309,8 @@ void AudioInputRendererHost::OnCreateStream( |
return; |
} |
- scoped_ptr<AudioInputSyncWriter> writer( |
- new AudioInputSyncWriter(&entry->shared_memory, |
- entry->shared_memory_segment_count)); |
+ scoped_ptr<AudioInputSyncWriter> writer(new AudioInputSyncWriter( |
+ &entry->shared_memory, entry->shared_memory_segment_count, audio_params)); |
if (!writer->Init()) { |
SendErrorMessage(stream_id, SYNC_WRITER_INIT_FAILED); |