playsound bug

Corona688 tsm at
Wed Oct 17 18:28:32 EDT 2001

Torbjörn Andersson wrote:

> There appears to be a bug in playsound's overflow handling in the
> callback function. As long as overflowBytes > 0 it will keep copying the
> same piece of the overflow buffer into the stream.
> It can't be very common that the overflow handler comes into play, or
> we'd have noticed it long ago. My test case was the 8-bit mono WAV file
> "cuckoo.wav" from MindRover. Sound_Decode() got a 16KB buffer, so the
> audio callback played the first 4KB right away, and then the next 4KB
> three times until the overflow buffer was drained.
> I think the included patch fixes it. Probably won't have any effect on
> the MP3 problem though.
> Torbjörn Andersson
>   ------------------------------------------------------------------------
>                         Name: playsound.diff.gz
>    playsound.diff.gz    Type: application/x-gzip
>                     Encoding: base64

Brilliant!  This sounds like exactly the same problem I had with the VOC

More information about the sdlsound mailing list