Index: content/renderer/pepper_plugin_delegate_impl.cc |
=================================================================== |
--- content/renderer/pepper_plugin_delegate_impl.cc (revision 118765) |
+++ content/renderer/pepper_plugin_delegate_impl.cc (working copy) |
@@ -36,6 +36,7 @@ |
#include "content/renderer/gpu/gpu_channel_host.h" |
#include "content/renderer/gpu/renderer_gl_context.h" |
#include "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h" |
+#include "content/renderer/media/audio_hardware.h" |
#include "content/renderer/media/audio_input_message_filter.h" |
#include "content/renderer/media/audio_message_filter.h" |
#include "content/renderer/media/video_capture_impl_manager.h" |
@@ -241,7 +242,12 @@ |
client_ = client; |
AudioParameters params; |
- params.format = AudioParameters::AUDIO_PCM_LINEAR; |
+ // Use the low latency back end if the client request is compatible. |
+ if (sample_rate == audio_hardware::GetOutputSampleRate() && |
+ sample_count % audio_hardware::GetOutputBufferSize() == 0) |
+ params.format = AudioParameters::AUDIO_PCM_LOW_LATENCY; |
+ else |
+ params.format = AudioParameters::AUDIO_PCM_LINEAR; |
params.channels = 2; |
params.sample_rate = sample_rate; |
params.bits_per_sample = 16; |