SDL_mixer, smpeg won't play mp3s

Hi,

I’m trying to build SDL_mixer so it can play mp3s. I tried Fedora rpms but had
no luck there so I’m building SDL_mixer from CVS.

I already have smpeg(-devel) installed from rpm:

$ rpm -ql smpeg smpeg-devel
/usr/bin/gtv
/usr/bin/plaympeg
/usr/lib/libsmpeg-0.4.so.0
/usr/lib/libsmpeg-0.4.so.0.1.3
/usr/share/doc/smpeg-0.4.4
/usr/share/doc/smpeg-0.4.4/CHANGES
/usr/share/doc/smpeg-0.4.4/COPYING
/usr/share/doc/smpeg-0.4.4/README
/usr/share/doc/smpeg-0.4.4/TODO
/usr/share/man/man1/gtv.1.gz
/usr/share/man/man1/plaympeg.1.gz
/usr/bin/smpeg-config
/usr/include/smpeg
/usr/include/smpeg/MPEG.h
/usr/include/smpeg/MPEGaction.h
/usr/include/smpeg/MPEGaudio.h
/usr/include/smpeg/MPEGerror.h
/usr/include/smpeg/MPEGfilter.h
/usr/include/smpeg/MPEGlist.h
/usr/include/smpeg/MPEGring.h
/usr/include/smpeg/MPEGstream.h
/usr/include/smpeg/MPEGsystem.h
/usr/include/smpeg/MPEGvideo.h
/usr/include/smpeg/smpeg.h
/usr/lib/libsmpeg.a
/usr/lib/libsmpeg.so
/usr/share/aclocal/smpeg.m4

When I run ./configure for SDL_mixer here’s the section for smpeg:

checking for sdl-config… /usr/bin/sdl-config
checking for SDL - version >= 1.2.4… yes
checking for Ogg Vorbis headers and libraries… yes
checking for smpeg-config… /usr/bin/smpeg-config
checking for SMPEG - version >= 0.4.3… yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating mikmod/Makefile
config.status: creating timidity/Makefile
config.status: creating native_midi/Makefile
config.status: creating native_midi_gpl/Makefile
config.status: creating SDL_mixer.spec
config.status: creating SDL_mixer.qpg
config.status: executing depfiles commands

So it all looks good. After make I try:

]$ ./playmus
~/tmp/mp3/eric_clapton/me_and_mr_johnson/01-when_you_got_a_good_friend.mp3
Opened audio at 22050 Hz 16 bit stereo, 4096 bytes audio buffer
Couldn’t load
/home/jbodnar/tmp/mp3/eric_clapton/me_and_mr_johnson/01-when_you_got_a_good_friend.mp3:
Module format not recognized

So it seems it can’t load smpeg? What am I doing wrong?–
Jason Bodnar
@Jason_Bodnar
http://www.shakabuku.org

“You want free speech? Let’s see you acknowledge a man whose words make
your blood boil who is standing center stage advocating at the top of
his lungs that which you would spend a lifetime opposing at the top of
yours.” – President Andrew Shephard, “The American President”

smpeg has problems loading some mp3 files. I’ve never seen exactly why. On some files it will just SegFault.
In the meantime you may try mpglib from or the nice wrapper SDL_sound from icculus.org (disable smpeg when you build it!!)
Another solution is to reencode the music in OGG Vorbis, or to reencode the mp3 in lame, which seems to make files that agree with smpeg.

-LIM-

You could also use FMod. I used it in my last game, and found it very easy
to use.
It took me a day to get a basic sound system up and running… and this is
with having no previous experience of sound coding. It also has some nice
features such as 3D sound capabilities (although I haven’t touched that
feature).

http://www.fmod.org/

It’s been developed for most of the major operating systems, and all of the
major consoles. Quite nice. Two thumbs and a toe up.From: jcatki@jonatkins.org (Jonathan Atkins)
Reply-To: “A list for developers using the SDL library.
(includesSDL-announce)”
To: "A list for developers using the SDL library. (includes
SDL-announce)"
Subject: Re: [SDL] SDL_mixer, smpeg won’t play mp3s
Date: Mon, 04 Oct 2004 18:34:21 -0500

smpeg has problems loading some mp3 files. I’ve never seen exactly why. On
some files it will just SegFault.
In the meantime you may try mpglib from or the nice wrapper SDL_sound from
icculus.org (disable smpeg when you build it!!)
Another solution is to reencode the music in OGG Vorbis, or to reencode the
mp3 in lame, which seems to make files that agree with smpeg.

-LIM-


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Powerful Parental Controls Let your child discover the best the Internet has
to offer.
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
Start enjoying all the benefits of MSN? Premium right now and get the
first two months FREE*.

Unfortunately, smpeg plays the file just fine using plaympeg so I think, for
some reason, SDL_mixer can’t load libsmpeg even though it’s in the standard
place. Perhaps I need to build smpeg from scratch instead of using the rpm.

Thanks,

JasonOn Mon, 04 Oct 2004 18:34:21 -0500, Jonathan Atkins wrote

smpeg has problems loading some mp3 files. I’ve never seen exactly
why. On some files it will just SegFault. In the meantime you may
try mpglib from or the nice wrapper SDL_sound from icculus.org
(disable smpeg when you build it!!) Another solution is to reencode
the music in OGG Vorbis, or to reencode the mp3 in lame, which seems
to make files that agree with smpeg.

-LIM-


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Jason Bodnar
@Jason_Bodnar
http://www.shakabuku.org

“You want free speech? Let’s see you acknowledge a man whose words make
your blood boil who is standing center stage advocating at the top of
his lungs that which you would spend a lifetime opposing at the top of
yours.” – President Andrew Shephard, “The American President”