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

Unified Diff: ppapi/proxy/audio_input_resource.cc

Issue 22886005: Switch audio synchronization from sleep() based to select() based. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix DCHECK. Created 7 years, 2 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
« no previous file with comments | « media/shared_memory_support.gypi ('k') | ppapi/proxy/ppb_audio_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/audio_input_resource.cc
diff --git a/ppapi/proxy/audio_input_resource.cc b/ppapi/proxy/audio_input_resource.cc
index 4a7afff1a2cfda14e35ef5fd61c9b910ea1dc681..7c29df5b744b602f5fdaff010263cdf698b65107 100644
--- a/ppapi/proxy/audio_input_resource.cc
+++ b/ppapi/proxy/audio_input_resource.cc
@@ -8,7 +8,6 @@
#include "base/logging.h"
#include "ipc/ipc_platform_file.h"
#include "media/audio/audio_parameters.h"
-#include "media/audio/shared_memory_util.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/proxy/resource_message_params.h"
@@ -168,15 +167,9 @@ void AudioInputResource::OnPluginMsgOpenReply(
params.TakeHandleOfTypeAtIndex(1, SerializedHandle::SHARED_MEMORY);
CHECK(serialized_shared_memory_handle.IsHandleValid());
- // See the comment in pepper_audio_input_host.cc about how we must call
- // TotalSharedMemorySizeInBytes to get the actual size of the buffer. Here,
- // we must call PacketSizeInBytes to get back the size of the audio buffer,
- // excluding the bytes that audio uses for book-keeping.
- size_t shared_memory_size = media::PacketSizeInBytes(
- serialized_shared_memory_handle.size());
-
open_state_ = OPENED;
- SetStreamInfo(serialized_shared_memory_handle.shmem(), shared_memory_size,
+ SetStreamInfo(serialized_shared_memory_handle.shmem(),
+ serialized_shared_memory_handle.size(),
socket_handle);
} else {
capturing_ = false;
« no previous file with comments | « media/shared_memory_support.gypi ('k') | ppapi/proxy/ppb_audio_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698