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

Unified Diff: ppapi/proxy/ppb_audio_proxy.cc

Issue 10832285: Switch OnMoreData() to use AudioBus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments. Use actual frame count for PPAPI. Created 8 years, 4 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: ppapi/proxy/ppb_audio_proxy.cc
diff --git a/ppapi/proxy/ppb_audio_proxy.cc b/ppapi/proxy/ppb_audio_proxy.cc
index bc83be368a19e3b9f54dc272dab8d27c9a05ccd2..af46f60968b98aab24096526f5df089124e605cd 100644
--- a/ppapi/proxy/ppb_audio_proxy.cc
+++ b/ppapi/proxy/ppb_audio_proxy.cc
@@ -322,6 +322,8 @@ void PPB_Audio_Proxy::OnMsgNotifyAudioStreamCreated(
IPC::PlatformFileForTransitToPlatformFile(socket_handle.descriptor()));
base::SharedMemory temp_mem(handle.shmem(), false);
} else {
+ EnterResourceNoLock<PPB_AudioConfig_API> config(
+ static_cast<Audio*>(enter.object())->GetCurrentConfig(), true);
// See the comment above 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,
@@ -329,7 +331,8 @@ void PPB_Audio_Proxy::OnMsgNotifyAudioStreamCreated(
static_cast<Audio*>(enter.object())->SetStreamInfo(
enter.resource()->pp_instance(), handle.shmem(),
media::PacketSizeInBytes(handle.size()),
- IPC::PlatformFileForTransitToPlatformFile(socket_handle.descriptor()));
+ IPC::PlatformFileForTransitToPlatformFile(socket_handle.descriptor()),
+ config.object()->GetSampleFrameCount());
}
}

Powered by Google App Engine
This is Rietveld 408576698