SDL_mixer crashing on loop - why?
The title says it all; why might a track being played through SDL_mixer crash on the loop of the track? If the track is set to play only the once, no crash occurs...
Results in...
Code:
/* This is all the sound handling code in the app; prior to this SDL was initialised with the proper SDL_INIT_AUDIO flag. */
Mix_OpenAudio( 22050, MIX_DEFAULT_FORMAT, 2, 2048 );
Mix_AllocateChannels( 8 );
m_music = Mix_LoadMUS( "placeholder.mid" );
/* Load a few samples with Mix_LoadWAV() here. */
Mix_PlayMusic( m_music, -1 );Results in...
Quote:Your buggy app has exited due to signal 4 (SIGILL).
Mark Bishop
I've heard of this happening on Linux before. I'll try looking through the archives for the source of the bug.
Have you tried swapping in a different sound file to play and see if that works?
"Pay no attention to that man behind the curtain." - Wizard of Oz
Quote:Have you tried swapping in a different sound file to play and see if that works?Yes, with no joy; I've also tried different types of sound files, et al... I've looked back through the archives of the mailing list, but as seems to be the trend today, none of my searches are turning up anything relevant...
Mark Bishop
My advice would be, find some sample code that does work, then slowly make it look more like what you were trying to do until it stops working. Or if it does exactly what you do need, drop it into your project with as little editing as possible. :-)
Measure twice, cut once, curse three or four times.
Just had another go at trying to fix this bug; after recompiling SDL_mixer, still no joy if using the original music files (.mid) – but if I now try to play .ogg's, there's no crash on the loop – so, unexpected, and possibly unwarranted, joy...
Mark Bishop
I am having problems with .mid too... It seems like my app crashes when the .mid is finished playing, while other formats works fine.
Well, as I wrote somewhere above, in my situation there's no crash when the track merely finishes playing, only when the track finishes playing and the specified no. of loops is >1 or -1...
I suppose the course of action to take is to just avoid .mid's when using SDL_mixer (as none of the emails I sent to the mailing list regarding this problem received any feedback...)
I suppose the course of action to take is to just avoid .mid's when using SDL_mixer (as none of the emails I sent to the mailing list regarding this problem received any feedback...)
Mark Bishop
I wish I knew more about it, but did you try searching the archives at the newsgroup page?
http://news.gmane.org/gmane.comp.lib.sdl
I have a vague recollection of some discussion about midi files, but it wasn't relevant to me at the time, so I don't really remember details. In any case, it sounds serious, and there are some members on that list that may still pick up on it. (Also, I noticed your post on that list is lacking some of the details you have since discovered and posted here, you might want to follow up on your post there)
Switching to another format is an option but you'll lose the advantage of small files. A good way to make up for that is to get really good kickin' music that midi could never pull off.
http://news.gmane.org/gmane.comp.lib.sdl
I have a vague recollection of some discussion about midi files, but it wasn't relevant to me at the time, so I don't really remember details. In any case, it sounds serious, and there are some members on that list that may still pick up on it. (Also, I noticed your post on that list is lacking some of the details you have since discovered and posted here, you might want to follow up on your post there)
Switching to another format is an option but you'll lose the advantage of small files. A good way to make up for that is to get really good kickin' music that midi could never pull off.
"Pay no attention to that man behind the curtain." - Wizard of Oz
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| glCreateShader crashing | Jar445 | 0 | 3,679 |
Jan 19, 2009 02:39 PM Last Post: Jar445 |
|
| SDl_mixer and image | bronxbomber92 | 3 | 3,114 |
Dec 15, 2006 12:27 PM Last Post: bronxbomber92 |
|
| Installing SDL_image & SDL_mixer | bronxbomber92 | 8 | 4,833 |
Oct 14, 2006 09:39 PM Last Post: szymczyk |
|
| Using SDL_mixer to play ogg sound (not music) effects | kordova | 3 | 5,496 |
Sep 1, 2006 12:29 PM Last Post: kordova |
|
| SDL_mixer exception at Mix_PlayMusic | kordova | 2 | 2,960 |
Sep 1, 2006 04:09 AM Last Post: kordova |
|

