From 77f2e18dcf92daa3ae88e27c5bb62f711b5ef7fc Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 27 May 2008 08:01:06 +0000 Subject: Reduce audio buffer size, as indicated on scummvm-devel svn-id: r32316 --- backends/platform/sdl/sdl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'backends/platform/sdl/sdl.cpp') diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 866f5299a0..91adc9b95d 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -403,10 +403,10 @@ bool OSystem_SDL::setSoundCallback(SoundProc proc, void *param) { _samplesPerSec = SAMPLES_PER_SEC; // Determine the sample buffer size. We want it to store enough data for - // about 1/10th of a second. Note that it must be a power of two. + // about 1/64th of a second. Note that it must be a power of two. // So e.g. at 22050 Hz, we request a sample buffer size of 2048. - int samples = 0x8000; - while (10 * samples >= _samplesPerSec) { + int samples = 8192; + while (64 * samples >= _samplesPerSec) { samples >>= 1; } -- cgit v1.2.3 From 6358878a435a929adc5c0ca503b3eda7fe3acdd6 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 27 May 2008 21:18:21 +0000 Subject: Fixed choppy sound on my Vista box. (after talking with Fingolfin about it) svn-id: r32331 --- backends/platform/sdl/sdl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backends/platform/sdl/sdl.cpp') diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 91adc9b95d..b750864ad8 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -403,10 +403,10 @@ bool OSystem_SDL::setSoundCallback(SoundProc proc, void *param) { _samplesPerSec = SAMPLES_PER_SEC; // Determine the sample buffer size. We want it to store enough data for - // about 1/64th of a second. Note that it must be a power of two. + // about 1/32th of a second. Note that it must be a power of two. // So e.g. at 22050 Hz, we request a sample buffer size of 2048. int samples = 8192; - while (64 * samples >= _samplesPerSec) { + while (32 * samples >= _samplesPerSec) { samples >>= 1; } -- cgit v1.2.3 From 73da6ab51ef86b89adad28a935ac22bad257b834 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 4 Jun 2008 17:20:25 +0000 Subject: - Removed -Wconversion from compiler options for g++ 4.3, it's behavior has fundamently changed in g++ 4.3 - Added -Wno-empty-body and -Wno-parentheses as compiler flags for g++ 4.3 for *now* (we should think of removing -Wparentheses though) - Fixed some warnings for g++ 4.3 (only for the engines I'm using) svn-id: r32540 --- backends/platform/sdl/sdl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/platform/sdl/sdl.cpp') diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index b750864ad8..be3aaad926 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -406,7 +406,7 @@ bool OSystem_SDL::setSoundCallback(SoundProc proc, void *param) { // about 1/32th of a second. Note that it must be a power of two. // So e.g. at 22050 Hz, we request a sample buffer size of 2048. int samples = 8192; - while (32 * samples >= _samplesPerSec) { + while (16 * samples >= _samplesPerSec) { samples >>= 1; } -- cgit v1.2.3