At some places I read that calling a SDL_mixer function from the function set by Mix_HookMusicFinished() is not so good. Probably because It's called in a different thread, eh?
So would it be correct to set a variable 'playing' to false in that callback, of course protected by a SDL_mutex, and then check in the mainloop whether this variable is false and then play the next track?
Or are there other ways around this? Having another 'update()' function in all those menu etc. loops is something I'd like to avoid if there's a clean way to do so.
Thanks
[SDL_mixer] The correct way for a playlist
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement