diff options
author | nfullagar@google.com <nfullagar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-26 20:29:17 +0000 |
---|---|---|
committer | nfullagar@google.com <nfullagar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-26 20:29:17 +0000 |
commit | e05234020763914d4b8ca9b781c75afa0f5e91b8 (patch) | |
tree | 770be28217d41996e751688a577baa71870ed547 | |
parent | 66bb70dbfa37c1c2e7e41745139ea98c6596e329 (diff) | |
download | chromium_src-e05234020763914d4b8ca9b781c75afa0f5e91b8.zip chromium_src-e05234020763914d4b8ca9b781c75afa0f5e91b8.tar.gz chromium_src-e05234020763914d4b8ca9b781c75afa0f5e91b8.tar.bz2 |
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
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144258 0039d316-1c4b-4281-b951-d872f2087c98
-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 1252de7..25f356d 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; } |