Sam Lantinga wrote:
I’m building the official SDL_mixer 1.2.0 packages, and I’m wondering
whether or not to include MP3 support by default? (Linux? Windows? BeOS?)
The advantage is that if your application uses SDL_mixer’s MP3 support,
people who download the binary packages will get it working for free.
The disadvantage is that the SDL_mixer binary runtime will require the
user to also install the SMPEG binary runtime.
The user is always able to custom build SDL_mixer with or without MP3
I worked on such a implementation using three different approaches: SMPEG,
mpg123 and now xaudio.
I found smpeg not an optimal solution for pure MP3 playback as it has the
added MPEG1 ballast (large lib), did not support rate conversion on the fly
(a feature that I found too hard to add to the SMPEG source) and it had
problems when seeking in MP3 streams (decoding thread lost the stream
synchonization and stopped playback).
The lib code that is part of mpg123 is outdated and the main code mpg123
itself works well, but is GPLed which is not a good match with the LGPLed
SDL. Maybe SAM can get the author of mpg123 to relax the license for use in
SDL. Nevertheless, this would be a good solution for GPLed SDL projects.
xaudio (www.xaudio.com) is binary only, cross-platform and free but one has
to sign a disclaimer type license to be able to use it. It hast a SYNC
interface to get at the data and an ASYNC interface that does all the playing
by itselfg. I am using that right now as it seems the most stable and
I think it might be worth it to actually create a seperate SDL_MP3 library
that will handle different input source libs (as listed above) and does MP3
to memory loading as well as rate conversion on the fly and provides an easy
to use SDL_Mixer interface.
My 0.02 cents.
| Andreas Schiffler aschiffler at home.com |
| Senior Systems Engineer - Tek21 Inc., Buffalo |
| 4707 Eastwood Cres., Niagara Falls, Ont L2E 1B4, Canada |
| +1-905-371-3652 (private) - +1-905-371-8834 (work/fax) |