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

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

Issue 17209003: Enable low latency mode for audio playback on Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: code review, add TEST= line Created 7 years, 6 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 | « no previous file | media/audio/android/audio_manager_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webrtc_audio_renderer.cc
===================================================================
--- content/renderer/media/webrtc_audio_renderer.cc (revision 206793)
+++ content/renderer/media/webrtc_audio_renderer.cc (working copy)
@@ -38,6 +38,7 @@
// low latency, currently 16000 is used to work around audio problem on some
// Android devices.
const int kValidOutputRates[] = {48000, 44100, 16000};
+const int kDefaultOutputBufferSize = 2048;
#else
const int kValidOutputRates[] = {44100};
#endif
@@ -169,7 +170,12 @@
media::AudioParameters sink_params;
+#if defined(OS_ANDROID)
+ buffer_size = kDefaultOutputBufferSize;
+#else
buffer_size = hardware_config->GetOutputBufferSize();
+#endif
+
sink_params.Reset(media::AudioParameters::AUDIO_PCM_LOW_LATENCY,
channel_layout, channels, 0, sample_rate, 16, buffer_size);
« no previous file with comments | « no previous file | media/audio/android/audio_manager_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698