[sdlsound] hmm...

Andersson Torbjorn E torbjorn.e.andersson at tietoenator.com
Tue Jun 25 07:42:34 EDT 2002


Good job on finding the bug!

<excuse type="weak">
I did add a debug printf() to check the value of sdlcvt.len_mult, but I
too assumed it was an integer.
</excuse>

> Historically, len_mult was meant to be a guide to let you know if you
> needed more memory allocated than your original sound data required.
> Should we deviate from SDL's current behaviour? Thoughts?

We already deviate from SDL's current behaviour, since converting between
arbitrary sample frequencies violates the "buffer length has to be a power
of two" rule. So I don't see any reason to needlessly cling to the SDL way,
if we can think of any better one. I doubt this code will make it back into
any 1.x version of SDL anyway.

Obviously as long as conversions are done in-place, the converter will
need a way to request a larger buffer, but the size shouldn't necessarily
have to be a multiple of the old length, right?

> Patches?  :)

Not while I'm at work. ;-)

Torbjörn

-- 
TietoEnator Resource Management AB
Persona
Torbjörn Andersson
http://www.rm.tietoenator.com/
 



More information about the sdlsound mailing list