diff options
author | nfullagar@google.com <nfullagar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-09 23:56:46 +0000 |
---|---|---|
committer | nfullagar@google.com <nfullagar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-09 23:56:46 +0000 |
commit | 0809cc321d413a265a99b535ea073114e56c631e (patch) | |
tree | e5d9dce70c770861c0b93592e1ccf0bf8eba20f6 /ppapi | |
parent | c5e4699baec7bfc7eb9851ca75f328e7b3b17255 (diff) | |
download | chromium_src-0809cc321d413a265a99b535ea073114e56c631e.zip chromium_src-0809cc321d413a265a99b535ea073114e56c631e.tar.gz chromium_src-0809cc321d413a265a99b535ea073114e56c631e.tar.bz2 |
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
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/shared_impl/ppb_audio_config_shared.cc | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |