diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-09-12 20:00:27 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-09-12 20:00:27 +0000 |
commit | c98f5845f64b0327be9579d711b3bcc1743fef44 (patch) | |
tree | e2bdd2e7a1813360c349c6564610de44cc106c07 /android/src/org | |
parent | 282adacb5447516a1ef6ba5b418c2a2b7aa4f0c3 (diff) |
Redo r28059, minBufferSize() turned out a bit more unstable on my Legend. Now use the MAX() of the old buffer and minBufferSize()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28066 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'android/src/org')
-rw-r--r-- | android/src/org/rockbox/RockboxPCM.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/android/src/org/rockbox/RockboxPCM.java b/android/src/org/rockbox/RockboxPCM.java index b79e78766d..52a47cfda0 100644 --- a/android/src/org/rockbox/RockboxPCM.java +++ b/android/src/org/rockbox/RockboxPCM.java @@ -41,7 +41,9 @@ public class RockboxPCM extends AudioTrack /* should be CHANNEL_OUT_STEREO in 2.0 and above */ private static final int channels = AudioFormat.CHANNEL_CONFIGURATION_STEREO; private static final int encoding = AudioFormat.ENCODING_PCM_16BIT; - private static final int buf_len = getMinBufferSize(44100, channels, encoding); + /* 24k is plenty, but some devices may have a higher minimum */ + private static final int buf_len = + Math.max(24<<10, getMinBufferSize(samplerate, channels, encoding)); private void LOG(CharSequence text) { |