[quake3] Mp3 support patch

Thilo Schulz arny at ats.s.bawue.de
Wed Oct 4 20:17:14 EDT 2006


On Wednesday 04 October 2006 23:24, Zachary J. Slater wrote:
> Actually, let me rescind that.
> After going and getting lunch and thinking about it more, I don't think
> there is a good argument for supporting mp3 /in ioquake3 per se/.

I came back to this issue because the World of Padman modification may face 
this decision right now. Of course they have long ago decided to go with .ogg 
vorbis whenever possible. However - there already are a couple of musicpacks 
out there with 22khz wave files. The question now is, and I myself am not 
quite sure whether these files had mp3s as source (a developer suggested 
that). The music consists of some recordings specially made for that 
modification. If the "originals" are only available as mp3 it would not be 
very bright to transcode them to ogg.

> I am still not very concerned about the patents, more so the extra code
> to maintain on the three major platforms ioquake3 supports. Major
> developers are using ogg vorbis already, and are very happy with it.

If you look at client/snd_codec.c, you'll notice there actually is some kind 
of an API that really has been made for supporting multiple codecs _by 
design_. As a matter of fact, in the now existing source code, only one call 
registering the codec is required at all. The rest is handled in the seperate 
file snd_codec_mp3.c (like snd_codec_ogg.c).
To me it looks like a pretty elegant solution where someone really thought 
about how to make it so you can easily add support for more codecs. Would be 
a shame to let all this thinking go to waste on only 2 codecs ;)
So, the only time I think this code ever needs maintainance is if you change 
the sound codec API. If I ever get ran over by an elephant, kicking the 
relevant parts is a job of 2 minutes.

> Which is what this really is, in the end, stewardship. Lets keep it that
> way, I don't mind if people fork, but I would rather it not come to
> that. So this sort of incomplete support of mp3 may encourage people to
> use ogg vorbis, or they'll use the patch and actually hopefully learn
> about ogg vorbis on the way to the patch.

Yep, I agree with that stewardship stuff.. if it's for "education" it probably 
really is better to not support mp3.
Nevertheless, I'll attach the most recent version of the patch to this mail 
and the bugtracker. Since my original "release" on the bugtracker I had to 
change two minor things, namely to make it compile with MSVC compiler and 
outputting decoded PCM data in MSB order on ppc machines. The patch has been 
confirmed to work on all architectures (including ppc) so yes, I think this 
is mature.

-- 
Thilo Schulz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ioquake3_mp3-rev917.diff
Type: text/x-diff
Size: 22531 bytes
Desc: not available
URL: <http://icculus.org/pipermail/quake3/attachments/20061005/1acdacfa/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://icculus.org/pipermail/quake3/attachments/20061005/1acdacfa/attachment.pgp>


More information about the quake3 mailing list