From 2e11cbb8a4f0868573b96cc3ee00d41959e11cb2 Mon Sep 17 00:00:00 2001 From: Adam Olsen Date: Thu, 17 May 2001 23:21:26 +0000 Subject: [PATCH] some sdl audio tweaks that made it work with artsc output thought I commited these before.. (where have we heard that before?) ;) --- libs/audio/targets/snd_sdl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/audio/targets/snd_sdl.c b/libs/audio/targets/snd_sdl.c index 7b51c4878..630747fed 100644 --- a/libs/audio/targets/snd_sdl.c +++ b/libs/audio/targets/snd_sdl.c @@ -59,7 +59,7 @@ paint_audio (void *unused, Uint8 * stream, int len) samplesbytes = shm->samples * (shm->samplebits / 8); shm->samplepos += streamsamples; - if (shm->samplepos >= shm->samples) + while (shm->samplepos >= shm->samples) shm->samplepos -= shm->samples; S_PaintChannels (soundtime + streamsamples); @@ -97,7 +97,7 @@ SNDDMA_Init (void) return 0; } desired.channels = 2; - desired.samples = 512; + desired.samples = 1024; desired.callback = paint_audio; /* Open the audio device */ @@ -140,7 +140,7 @@ SNDDMA_Init (void) shm->samplebits = (obtained.format & 0xFF); shm->speed = obtained.freq; shm->channels = obtained.channels; - shm->samples = obtained.samples * 4; + shm->samples = obtained.samples * 16; shm->samplepos = 0; shm->submission_chunk = 1; shm->buffer = calloc(shm->samples * (shm->samplebits / 8), 1);