We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 357 - Mix_SetMusicCMD and playing forever
Summary: Mix_SetMusicCMD and playing forever
Status: RESOLVED FIXED
Alias: None
Product: SDL_mixer
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-04 01:28 UTC by Darius Scerbavicius
Modified: 2009-10-11 01:41 UTC (History)
0 users

See Also:


Attachments
simple test program and a midi file (721 bytes, application/x-gzip)
2006-11-04 01:31 UTC, Darius Scerbavicius
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Darius Scerbavicius 2006-11-04 01:28:43 UTC
On Ubuntu Edgy with SDL_mixer 1.2.7 and SDL_mixer 1.2.6, after setting music cmd and trying to play music forever ( Mix_PlayMusic(music, -1); ), after it loops the first time, I cannot quit in the middle. I have to wait for it to finish first. It quits fine before it starts looping.
Is this a bug or am i doing something wrong?
Comment 1 Darius Scerbavicius 2006-11-04 01:31:45 UTC
Created attachment 179 [details]
simple test program and a midi file

Seems to happen with both Mix_SetMusicCMD("timidity"); and Mix_SetMusicCMD("aplaymidi -p 17:0"); but doesn't happen when I don't use Mix_SetMusicCMD.
Comment 2 Sam Lantinga 2009-10-11 01:41:49 UTC
Thanks, this was a sneaky one!
When music loops, the looping music play call is done from the audio thread, and
 SDL threads block signals to avoid signal side effects.  So we just need to unb
lock those signals before executing the new process.

You provided a great test case, thanks!

This is fixed for the next release. :)