[SDL] loopwave now works on my system

Patrice Mandin mandin.patrice at wanadoo.fr
Sat Jan 29 02:04:02 PST 2005


Le Fri, 28 Jan 2005 14:04:18 +0100
Patrice Mandin <mandin.patrice at wanadoo.fr> a écrit:

> I found the cause of my problems with loopwave.c: the SDL_MixAudio()
> function in SDL_mixer.c. If I replace the calls to SDL_MixAudio() by a
> simple memcpy() in fillerup() in loopwave.c, the replay is correct.

Well, in fact I was wrong. It was simply the buffer used for conversion
(audio->convert.buf) that was not cleared between calls, so it was filling
with more and more junk. *Apologizes*

Maybe we could use SDL_SwapBE16() and SDL_SwapLE16() in SDL_MixAudio() to
mix AUDIO_S16MSB/AUDIO_S16LSB. It would take less operations where these
functions are assembly optimized.

-- 
Patrice Mandin
WWW: http://membres.lycos.fr/pmandin/
Programmeur Linux, Atari
Spécialité: Développement, jeux





More information about the SDL mailing list