From 9e7ee4953ec5ca41a30c178ce778149a86f07b8f Mon Sep 17 00:00:00 2001 From: dhewg Date: Mon, 14 Mar 2011 20:26:35 +0100 Subject: ANDROID: Halve the audio buffer size Also, run into the blocking audio write without sleep. This hopefully fixes audio hickups on slow devices. --- backends/platform/android/org/inodes/gus/scummvm/ScummVM.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backends/platform/android/org') diff --git a/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java b/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java index 0bc5f3ce4c..dfb585518a 100644 --- a/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java +++ b/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java @@ -245,8 +245,8 @@ public abstract class ScummVM implements SurfaceHolder.Callback, Runnable { AudioFormat.CHANNEL_CONFIGURATION_STEREO, AudioFormat.ENCODING_PCM_16BIT); - // ~100ms - int buffer_size_want = (_sample_rate * 2 * 2 / 10) & ~1023; + // ~50ms + int buffer_size_want = (_sample_rate * 2 * 2 / 20) & ~1023; if (_buffer_size < buffer_size_want) { Log.w(LOG_TAG, String.format( -- cgit v1.2.3