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

Unified Diff: content/renderer/media/audio_device.cc

Issue 8497014: Adds proper IPC usage for AudioDevice::GetAudioHardwareBufferSize(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fixes indentation error Created 9 years, 1 month 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
« content/common/view_messages.h ('K') | « content/common/view_messages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/audio_device.cc
===================================================================
--- content/renderer/media/audio_device.cc (revision 108984)
+++ content/renderer/media/audio_device.cc (working copy)
@@ -213,7 +213,6 @@
while ((sizeof(pending_data) == socket_->Receive(&pending_data,
sizeof(pending_data))) &&
(pending_data >= 0)) {
-
// Convert the number of pending bytes in the render buffer
// into milliseconds.
audio_delay_milliseconds_ = pending_data / bytes_per_ms;
@@ -249,8 +248,10 @@
// Uses cached value if possible.
static size_t buffer_size = 0;
- if (!buffer_size)
- buffer_size = media::GetAudioHardwareBufferSize();
+ if (!buffer_size) {
+ RenderThreadImpl::current()->Send(
+ new ViewHostMsg_GetHardwareBufferSize(&buffer_size));
+ }
return buffer_size;
}
« content/common/view_messages.h ('K') | « content/common/view_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698