From c98f5845f64b0327be9579d711b3bcc1743fef44 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sun, 12 Sep 2010 20:00:27 +0000 Subject: [PATCH] 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 --- android/src/org/rockbox/RockboxPCM.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) {