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 291 - SDL_mixer1.2.7 - MP3 playback is unstable on WinXP...
Summary: SDL_mixer1.2.7 - MP3 playback is unstable on WinXP...
Status: RESOLVED FIXED
Alias: None
Product: SDL_mixer
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86 Windows (XP)
: P2 critical
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL: http://www.SilentHeroProductions.com/
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-02 08:22 UTC by JeZ+Lee
Modified: 2007-07-21 00:42 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description JeZ+Lee 2006-08-02 08:22:32 UTC
SDL_mixer1.2.7 - MP3 playback is unstable on WinXP...

I read the instructions and checked my source code and everything seems to be written ok, but using certain values for "int Mix_OpenAudio(int frequency, Uint16 format, int channels, int chunksize)" produces program lock-ups (crashes).


Example:

Using:

Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT , MIX_DEFAULT_CHANNELS, 1024)

sometimes crashes on initialization (Mix_OpenAudio) and sometimes crashes on switching current MP3 music playing (Mix_PlayMusic) and sometimes crashes on de-initialization (Mix_CloseAudio).


Changing to:

Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT , MIX_DEFAULT_CHANNELS, 512)

seems to fix the crash problems.


Hope someone can fix these issues and release fixes in SDL_mixer 1.2.8


Jesse "JeZ+Lee" Palser
SLNTHERO@AOL.com
Silent Hero Productions(R)
http://www.SilentHeroProductions.com/
Comment 1 Peter Mulholland 2006-10-03 09:08:41 UTC
SMPEG is pretty poor. I would suggest using either mpglib (which is now LGPL) or decmpa to support MP3 files.
Comment 2 Sam Lantinga 2007-07-14 11:26:35 UTC
There was a bug in SDL with certain sample rate conversions which might be the cause of this problem.  Can you download the SDL 1.2.12 prerelease DLL at http://www.libsdl.org/tmp/SDL.dll and see if that fixes your problem?

If you still get the crash, can you try it with the playmus sample application and see if that also crashes?  Either way, can you attach the song that crashes and as much debug information about the actual crash as you can?  (stack trace, local variables, etc.)

Thanks!
Comment 3 Sam Lantinga 2007-07-14 11:29:23 UTC
By the way, Peter, mpg123 is in unstable development and doesn't have a clean library API yet.  decmpa is based on splay, which is what smpeg uses, but smpeg includes several crash fixes and decoding improvements accumulated over several years of game porting use.
Comment 4 Sam Lantinga 2007-07-21 00:42:26 UTC
I believe this is fixed in SDL_mixer 1.2.8.  Please reopen this bug if you're still seeing the problem.  Thanks!