[SDL] Changing music tracks in SDL_Mixer
masonwheeler
masonwheeler at yahoo.com
Sat Oct 27 14:14:08 PDT 2007
I'm trying to use SDL_Mixer to handle audio in a game I'm writing. SFX work
fine, but unfortunately, it's being quite ornery on the subject of
soundtrack management. I can't get it to switch tracks. I load various
songs into an array during initialization with Mix_LoadMUS, and the first
one I play works just fine. But after that, if I try to switch tracks, no
other song will play. I call Mix_HaltMusic, then Mix_PlayMusic with the
other song's pointer, then Mix_HookMusicFinished. No music actually plays,
but after the appropriate amount of time, the callback routine does get
called, as if it had been playing silently all along. After this, I'm able
to play the original song again with no trouble, but switching to other
songs just doesn't work.
Does anyone know what the step is I'm missing? Such an all-around
well-designed library simply *can't* have fallen flat on its face on this
one crucial feature, so I must be missing a step somewhere. Can anyone tell
me what it is?
Mason
--
View this message in context: http://www.nabble.com/Changing-music-tracks-in-SDL_Mixer-tf4704537.html#a13447451
Sent from the SDL mailing list archive at Nabble.com.
More information about the SDL
mailing list