Sign in to follow this  

Mix_FreeMusic() blocks forever on some machines

Recommended Posts

I've been having a strange bit of trouble with SDL Mixer's music functions lately. Essentially, I have set up a very basic music playing scheme in a program, and it works on almost every computer I've sent it to -- except one or two. For them, any calls to Mix_FreeMusic() end up blocking indefinitely, and they have to terminate the program manually. So, I have it so that when the user starts a new game, a song is started, and it just loops. If the user starts another new game, or sends a console command to start another song, the current song is halted and freed before starting the new song, and this is where it is constantly hanging, right when Mix_FreeMusic() is called. I have not been able to find any useful information about why this could be happening. It is not being called from within a callback function, as SDL_Mixer warns about. The documentation says it may block until the song has faded out, but I threw in code to check if it was set to fade (it wasn't), and then code to force it to fade in 1 ms (no change in behavior). I'm tempted to write this off as just a problem with those computers, but that might just be too optimistic. I really don't want to switch to another audio api, but I may have to. Also, I don't have any additional information about their computers, because they are in Utah and I am still trying to get more debugging information from them. Any ideas?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this