I have implemented an MP3 decoder for ioQ3 using the ogg decoder file as an example.
Compiling Quake3 with the decoder requires a working libmad installation.
Similarly to vorbis support, compiling the decoder is completely optional and can be enabled the same way the vorbis decoder gets enabled.
I have edited the Makefile and README to reflect the changes, too.
libmad returns decoded samples in 24 bit PCM format. I am using the dithering and scaling routines taken from the xmms-mad plugin to convert the pcm data to LE 16-bit pcm. Dithering can be disabled by setting an appropriate macro in snd_codec_mp3.c
Do the mplayer, xmms, mpg123, libmad people etc. have one?
I read about the license coniditions at http://www.mp3licensing.com/ and haven't found any explicit info about noncomercially developed Open Source software
(In reply to comment #4)
> Do the mplayer, xmms, mpg123, libmad people etc. have one?
No.
> I read about the license coniditions at http://www.mp3licensing.com/ and
> haven't found any explicit info about noncomercially developed Open Source
> software
Open source software does not need an MP3 license, but if it's to be used commercially (e.g. as part of a Linux distribution), it does.
Many (most) Linux distros do not include support for MP3 for this reason alone.
Then frankly, I don't see the problem here. ioquake3 is a non-commercially developed and open source engine.
Furthermore, quake3 does not include any mp3s so the commercial part of it doesn't use mp3 either.
(In reply to comment #6)
> Then frankly, I don't see the problem here. ioquake3 is a non-commercially
> developed and open source engine.
Right, but by including MP3 capability you're precluding it from being distributed with the majority of commercial Linux distros.
> Furthermore, quake3 does not include any mp3s so the commercial part of it
> doesn't use mp3 either.
It doesn't matter that there is no MP3 data, it matters whether or not patented algorithms (which expire in 2010) are contained in the commercially distributed code.
One of the primary reasons Ogg Vorbis exists at all is because of MP3 patent issues. It's a legally emotive issue. I for one am very wary.
Yes ok, but:
Most commercial distros ship binaries. Considering you have to explicitly enable mp3 support you can easily build this without mp3 support.
My code only adds control functions for the libmad library. This means, there is no patented code used at all. So offering the code as GPL requires is a non-issue as well.
(In reply to comment #8)
> Yes ok, but:
> Most commercial distros ship binaries. Considering you have to explicitly
> enable mp3 support you can easily build this without mp3 support.
I guess that's fair enough. Fundamentally though I don't see why we need MP3 support when OV is already well supported and not patent encumbered? I know it's not enabled by default, but it's a pretty big glob of extra code to maintain... and I'm not sure why it's a desirable thing?
> My code only adds control functions for the libmad library. This means, there
> is no patented code used at all. So offering the code as GPL requires is a
> non-issue as well.
The act of linking brings the library's code into the binary it is linked against. The bottom line is if an application supports layer 2 or 3 decoding (through any means) and it is commercially distributed, you MUST have an MP3 license.
(In reply to comment #9)
> I guess that's fair enough. Fundamentally though I don't see why we need MP3
> support when OV is already well supported and not patent encumbered? I know
> it's not enabled by default, but it's a pretty big glob of extra code to
> maintain... and I'm not sure why it's a desirable thing?
We have to accept that still an overwhelming share of sound files, music etc. are kept in mp3 though personally I definitely prefer vorbis.
I.e. My EliteForce project explicitly requires it as most sounds are in mp3.
I am happy to continue maintain my mp3 sound decoder, that is not the problem at all.
> > My code only adds control functions for the libmad library. This means, there
> > is no patented code used at all. So offering the code as GPL requires is a
> > non-issue as well.
>
> The act of linking brings the library's code into the binary it is linked
> against. The bottom line is if an application supports layer 2 or 3 decoding
> (through any means) and it is commercially distributed, you MUST have an MP3
> license.
I already said that vendors can link ioquake3 without mp3 support. My point is that they don't even need to worry about the snd_codec_mp3.c file if they make the source public, to comply with the GPL, as that file does not contain any algorythms used for the decoding process itself but only tells an external library what and how to do it.
Setting a QA contact on all ioquake3 bugs, even resolved ones. Sorry if you get a flood of email from this, it should only happen once. Apologies for the incovenience.
--ryan.
Created attachment 841 [details] implements MP3 support
Created attachment 1105 [details] mp3 support for ioquake3