Mechanism of getting buffer seperate from Sound_Sample?

Corona688 tsm at accesscomm.ca
Tue Jan 14 01:26:34 EST 2003


Say, you're decoding an awful lot of raw data with Sound_DecodeAll, and
want to pass this data to a function that doesn't know how to free
Sound_Sample structures.  In fact, it doesn't know SDL_sound exists at
all, and expects to be able to free this block with free() when it's
done.  How can one free the SDL_sound structure, without freeing the
buffer?  I've been setting sample->buffer to NULL before freeing it, and
that seems to work, but I suspect that's extremely bad form...




More information about the sdlsound mailing list