WAVE playback bad

Torbjörn Andersson torbjorn.e.andersson at tietoenator.com
Thu Oct 4 06:09:07 EDT 2001

I replied to sender instead of to mailing list again... >sigh<

Max Horn wrote:

 > In the case we rolled our own (crude) converter. If we do this, and do
 > it right, we could then distribute it back to Sam for inclusion in
 > future SDL version (though probably not 1.2.3, I can imagine it would
 > break backward compatibility with some apps...)

This may be old news, but SDL already has a SDL_RateSLOW() in 
SDL_audiocvt.c, in addition to SDL_RateMUL2() and SDL_RateDIV2(). 
Unfortunately it's never used. According to the comment:

         /* The problem with this is that if the input buffer is
            say 1K, and the conversion rate is say 1.1, then the
            output buffer is 1.1K, which may not be an acceptable
            buffer size for the audio driver (not a power of 2)
         /* For now, punt and hope the rate distortion isn't great.

So I guess either the audio drivers would have to be rewritten to handle 
arbitrary length buffers, or the sound converter would have to be 
rewritten so that instead of telling it how much input data you have, 
you tell it how much output data you want. I don't know which would be 

(I'll leave this question for someone who actually knows how SDL works. 
I'm just faking it. ;-)

Torbjörn Andersson

More information about the sdlsound mailing list