[SDL] Changing music tracks in SDL_Mixer

Jesse P. slnthero at aol.com
Sat Oct 27 14:28:39 PDT 2007


Hi,

I would be helpful to us if you stated what music file format you are 
using...

I personally like the "*.MOD" music format, but last I checked it was 
not 100% in SDL_Mixer.
I am currently using Ogg Vorbis "*.OGG" music file format which is 
similar to MP3.


Jesse "JeZ+Lee"
Silent Hero Productions(R)
Video Game Design Studio
http://www.SilentHeroProductions.com







masonwheeler wrote:
> 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
>   



More information about the SDL mailing list