Bug in SDL mixer

in sdl_mixer 1.2.8,
file:effect_position.c
function: _Eff_PositionDeinit

the global variable position_channels is initialized to zero in the declaration. If you call Mix_SetPosition then later call Mix_CloseAudio() and SDL_QuitSubSystem(SDL_INIT_AUDIO). It shutsdown OK.
If you call SDL_Init and Mix_openAudio, the next call to Mix_SetPosition will crash due to uninitialized memory.

Adding position_channels=0; to the last line of _Eff_PositionDeinit fixes the problem and allows this subsystem to be stopped and restarted.

Don Weingarden

in sdl_mixer 1.2.8,
file:effect_position.c
function: _Eff_PositionDeinit

Yep, this is fixed in subversion. Thanks! :slight_smile:

See ya,
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC