[quake3] Mp3 support patch

Zachary J. Slater zakk at timedoctor.org
Wed Oct 4 22:22:57 EDT 2006


Thilo Schulz wrote:
> 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.

Then they can use ioquake3 + your patch. More argument follows :)

>> 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.

I don't care. More code in SVN is more code that has to be kept track of.

>> 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.

"Education" not so much. I would honestly prefer that you make a section 
on the website for patches not committed, which describes the 
functionality they provide and provides download links. A download 
location for the patches (in or out of svn) could be decided later, as 
long as they aren't hosted anywhere but i.o

If you are unwilling to do that, then I can, or floam, or someone else. 
However, that is right now, the only way mp3 support will be provided. I 
would also like to at some point come up with some way to better provide 
a framework specifically for external developers to sync to our tree, 
and then a magical unicorn flies in and asks if they want mp3 support 
and downloads this patch, plus whatever other ones they want, and 
applies it to their source tree along with whatever other updates they 
want from ioquake3 whenever they want.

I still haven't found that magical unicorn :(

-- 
- Zachary J. Slater
zakk at timedoctor.org
zacharyslater at gmail.com



More information about the quake3 mailing list