From 0809cc321d413a265a99b535ea073114e56c631e Mon Sep 17 00:00:00 2001 From: "nfullagar@google.com" Date: Mon, 9 Jul 2012 23:56:46 +0000 Subject: Merge 144258 - Increase default buffer size when back end can't recommend one. This should help avoid stuttering on older XP machines, or vista machines where hardware sample rate != application sample rate. The downside is audio latency will be higher. Old value was for 30ms buffers. New value is for 50ms buffers. TEST=verify w/ nhu...@adobe.com once in canary BUG=http://code.google.com/p/chromium/issues/detail?id=133393 Review URL: https://chromiumcodereview.appspot.com/10656027 TBR=nfullagar@google.com Review URL: https://chromiumcodereview.appspot.com/10764012 git-svn-id: svn://svn.chromium.org/chrome/branches/1180/src@145799 0039d316-1c4b-4281-b951-d872f2087c98 --- ppapi/shared_impl/ppb_audio_config_shared.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ppapi') diff --git a/ppapi/shared_impl/ppb_audio_config_shared.cc b/ppapi/shared_impl/ppb_audio_config_shared.cc index 6803c3c..4b06d46 100644 --- a/ppapi/shared_impl/ppb_audio_config_shared.cc +++ b/ppapi/shared_impl/ppb_audio_config_shared.cc @@ -74,14 +74,14 @@ uint32_t PPB_AudioConfig_Shared::RecommendSampleFrameCount_1_1( return recommendation; } - // Otherwise, recommend a conservative 30ms buffer based on sample rate. - const uint32_t kDefault30msAt44100kHz = 1323; - const uint32_t kDefault30msAt48000kHz = 1440; + // Otherwise, recommend a conservative 50ms buffer based on sample rate. + const uint32_t kDefault50msAt44100kHz = 2205; + const uint32_t kDefault50msAt48000kHz = 2400; switch (sample_rate) { case PP_AUDIOSAMPLERATE_44100: - return kDefault30msAt44100kHz; + return kDefault50msAt44100kHz; case PP_AUDIOSAMPLERATE_48000: - return kDefault30msAt48000kHz; + return kDefault50msAt48000kHz; case PP_AUDIOSAMPLERATE_NONE: return 0; } -- cgit v1.1