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

Unified Diff: ppapi/shared_impl/ppb_audio_shared.h

Issue 10832285: Switch OnMoreData() to use AudioBus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Comments. Created 8 years, 3 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 | « ppapi/proxy/ppb_audio_proxy.cc ('k') | ppapi/shared_impl/ppb_audio_shared.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/ppb_audio_shared.h
diff --git a/ppapi/shared_impl/ppb_audio_shared.h b/ppapi/shared_impl/ppb_audio_shared.h
index ed3a5c266ef3a1ee23e905ea7a980e11b6d739b7..0b6afd48841a74de39206305fbf16e91d5911b78 100644
--- a/ppapi/shared_impl/ppb_audio_shared.h
+++ b/ppapi/shared_impl/ppb_audio_shared.h
@@ -9,6 +9,7 @@
#include "base/shared_memory.h"
#include "base/sync_socket.h"
#include "base/threading/simple_thread.h"
+#include "media/base/audio_bus.h"
#include "ppapi/c/ppb_audio.h"
#include "ppapi/shared_impl/resource.h"
#include "ppapi/thunk/ppb_audio_api.h"
@@ -53,7 +54,8 @@ class PPAPI_SHARED_EXPORT PPB_Audio_Shared
void SetStreamInfo(PP_Instance instance,
base::SharedMemoryHandle shared_memory_handle,
size_t shared_memory_size,
- base::SyncSocket::Handle socket_handle);
+ base::SyncSocket::Handle socket_handle,
+ int sample_frame_count);
#if defined(OS_NACL)
// NaCl has a special API for IRT code to create threads that can call back
@@ -102,6 +104,13 @@ class PPAPI_SHARED_EXPORT PPB_Audio_Shared
// User data pointer passed verbatim to the callback function.
void* user_data_;
+ // AudioBus for shuttling data across the shared memory.
+ scoped_ptr<media::AudioBus> audio_bus_;
+
+ // Internal buffer for client's integer audio data.
+ int client_buffer_size_bytes_;
+ scoped_array<uint8_t> client_buffer_;
+
DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Shared);
};
« no previous file with comments | « ppapi/proxy/ppb_audio_proxy.cc ('k') | ppapi/shared_impl/ppb_audio_shared.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698