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

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

Issue 335343004: Revert 277794 "Modifies AudioInputCallback::OnData and use media..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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: trunk/src/content/browser/renderer_host/media/audio_input_renderer_host.cc
===================================================================
--- trunk/src/content/browser/renderer_host/media/audio_input_renderer_host.cc (revision 277811)
+++ trunk/src/content/browser/renderer_host/media/audio_input_renderer_host.cc (working copy)
@@ -17,7 +17,6 @@
#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"
namespace content {
@@ -114,7 +113,8 @@
}
void AudioInputRendererHost::OnData(media::AudioInputController* controller,
- const media::AudioBus* data) {
+ const uint8* data,
+ uint32 size) {
NOTREACHED() << "Only low-latency mode is supported.";
}
@@ -292,9 +292,8 @@
// Create a new AudioEntry structure.
scoped_ptr<AudioEntry> entry(new AudioEntry());
- const uint32 segment_size =
- (sizeof(media::AudioInputBufferParameters) +
- media::AudioBus::CalculateMemorySize(audio_params));
+ const uint32 segment_size = (sizeof(media::AudioInputBufferParameters) +
+ audio_params.GetBytesPerBuffer());
entry->shared_memory_segment_count = config.shared_memory_count;
// Create the shared memory and share it with the renderer process
@@ -308,8 +307,9 @@
return;
}
- scoped_ptr<AudioInputSyncWriter> writer(new AudioInputSyncWriter(
- &entry->shared_memory, entry->shared_memory_segment_count, audio_params));
+ scoped_ptr<AudioInputSyncWriter> writer(
+ new AudioInputSyncWriter(&entry->shared_memory,
+ entry->shared_memory_segment_count));
if (!writer->Init()) {
SendErrorMessage(stream_id, SYNC_WRITER_INIT_FAILED);

Powered by Google App Engine
This is Rietveld 408576698