[sdlsound] hmm...

Ryan C. Gordon icculus at clutteredmind.org
Wed Jun 26 13:48:46 EDT 2002


> I'am not shure if I read the above correctly: given the case we have a
> sample with a buffer
> length of 135k - is it right that we allocate a buffer of 256k?

In SDL, the conversions are always done in place, which means you might
need a bigger buffer than the original data needs (since changing from
mono to stereo would need twice as much space).

In SDL, len_mult is never less than one, but it is frequently greater than
it. If the converted data is smaller than the original, you couldn't
shrink the buffer anyhow, since the original needs that whole block of
space, and thus, len_mult would be one.

I'm not sure I'm answering your question, though.

--ryan.





More information about the sdlsound mailing list