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
This commit is contained in:
Thomas Martitz 2010-09-12 20:00:27 +00:00
parent 282adacb54
commit c98f5845f6

View file

@ -41,7 +41,9 @@ public class RockboxPCM extends AudioTrack
/* should be CHANNEL_OUT_STEREO in 2.0 and above */ /* should be CHANNEL_OUT_STEREO in 2.0 and above */
private static final int channels = AudioFormat.CHANNEL_CONFIGURATION_STEREO; private static final int channels = AudioFormat.CHANNEL_CONFIGURATION_STEREO;
private static final int encoding = AudioFormat.ENCODING_PCM_16BIT; 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) private void LOG(CharSequence text)
{ {