SDL_mixer feature request and HaltChannel Report

Just to let you know the 1.2.4 patch fixed my HaltChannel problems under
win32. I’ve been working on some code, which uses HaltChannel, for over
a week and was getting paranoid. Thanks for the fix!

I’d like to load raw samples into SDL_mixer without going through the
WAVE/VOC route. There maybe a way to do this already with SDL_mixer but
I can’t find it and would like a function added to SDL_mixer.

Currently I have to convert the sample into WAVE format (in memory) and
use Mix_LoadWAV_RW(SDL_RWops *src, int freesrc). The samples themselves
have to be loaded and removed continously as they are generated in the
main program. There is also an unecessary performance overhead as the
WAVE files are converted back to raw samples inside SDL_mixer.

Regards
Simon Quinn

Just to let you know the 1.2.4 patch fixed my HaltChannel problems under
win32. I’ve been working on some code, which uses HaltChannel, for over
a week and was getting paranoid. Thanks for the fix!

Great! Thanks Ryan! :slight_smile:

I’d like to load raw samples into SDL_mixer without going through the
WAVE/VOC route. There maybe a way to do this already with SDL_mixer but
I can’t find it and would like a function added to SDL_mixer.

You got it:

  • Added a function to load audio data from memory: Mix_QuickLoad_RAW()

Go ahead and grab the latest CVS snapshot and try it out:
http://www.libsdl.org/cvs/SDL_mixer-1.2.4.tar.gz

See ya!
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Wow! Thanks, that was quick. I’ve already started using the new function
and it works great.>>I’d like to load raw samples into SDL_mixer without going through the

WAVE/VOC route. There maybe a way to do this already with SDL_mixer but
I can’t find it and would like a function added to SDL_mixer.

You got it:

  • Added a function to load audio data from memory: Mix_QuickLoad_RAW()

I’d like to load raw samples into SDL_mixer without going through the
WAVE/VOC route. There maybe a way to do this already with SDL_mixer but
I can’t find it and would like a function added to SDL_mixer.

There isn’t a clean interface to this right now, but I built a Mix_Chunk
directly for Candy Cruncher, and it worked fine:

Mix_Chunk *chunk = new Mix_Chunk;
chunk->allocated = 1;
chunk->abuf = buffer;  // in format specified by Mix_QuerySpec().
chunk->alen = size_of_buffer;
chunk->volume = MIX_MAX_VOLUME;

This isn’t supported, and Your Mileage May Vary.

Currently I have to convert the sample into WAVE format (in memory) and
use Mix_LoadWAV_RW(SDL_RWops *src, int freesrc). The samples themselves
have to be loaded and removed continously as they are generated in the
main program. There is also an unecessary performance overhead as the
WAVE files are converted back to raw samples inside SDL_mixer.

When we start using SDL_sound for a backend in SDL_mixer, all this misery
goes away.

–ryan.

You got it:

  • Added a function to load audio data from memory: Mix_QuickLoad_RAW()

Oh, or you could do that. :slight_smile:

–ryan.