Game Development Community

mp3s in torque

by Jared Hoberock · in Torque Game Engine · 02/04/2002 (10:21 pm) · 15 replies

Can it be done easily? I found a few Tribes2 modifications that would allow the player to select and play mp3s while playing the game. Does anyone know if it would be directly applicable to Torque?

Thanks!
J

#1
02/05/2002 (9:03 am)
Tribes 2 used mp3's as it's music. The mods just allowed you to play whatever mp3's you wanted. I *think*, and I'm not sure of this, that the mp3 stuff was ripped out because it used the Miles Sound libraries that Dynamix licenced. Rick had to re-do all the audio stuff using OpenAL. This could be coded back in, however.
#2
02/05/2002 (9:30 am)
mp3 isn't a free format...i guess that's why it isn't supported in Torque. I hope garagegames programs in the ogg vorbis format soon, that should be as good as mp3.
#3
02/05/2002 (9:10 pm)
Assuming I have an open mp3 decoding library, do you know where in the Audio code the changes should be made?
Thanks much.

J
#4
02/06/2002 (1:30 pm)
If you're looking for a good mp3 library, check out bass.dll. It's lightweight and super easy to use (it even supports 3d sound and EAX). It's heavily used in the demo scene because of how efficient it is (and it's free to use for freeware). I've used it before in a little demo thingy I did a little while back. It only took about an hour to drop in my project to have full mp3 support or almost any other file you could want.

There is a registration fee if you are going to use it in a commercial piece of software but is free for freeware.
#5
03/01/2002 (2:22 am)
Hy,
I would like to add mp3 play-back in Torque.

As far as I looked at the audio code, I think I should derive a class from audioBuffer and them convert the MP3 file into an AL buffer. However, it does not seem good to do like that 'cause I do not want to have everything in memory only stream the mp3 file.

So my question :
is there any support for streaming audio in Torque (i do not thing so, but i did not write the engine ;)) ?
If no, can I have some hint on how to add it in Torque (class to look at, ...) ?

BTW, I will use an open source mp3 library.
#6
03/01/2002 (12:05 pm)
we simply implemented the use of fmod
it was easy to write a simple engine for and apply mp3 support like that ...
could prolly post the whole thing as a resource if many are interested .. have yet to continue the support into regular wav play tho
#7
03/01/2002 (1:27 pm)
For sure I'm interested.
Even if you will not put it as a ressources, I will be interested.
#8
03/01/2002 (4:01 pm)
I would also be interested in this BadGuy :)
#9
03/01/2002 (5:32 pm)
Ok.
ill prep it up clean it up and post this weekend
#10
03/02/2002 (1:17 am)
If you post it, you'll be my hero.

J
#11
03/06/2002 (1:49 pm)
teammate XakMan
has posted the fmod code
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2305
#12
03/10/2002 (3:22 am)
Sorry to resurect this, but...

Is the format itself copyright, or just the players? Is it legal to use fmod?

What exactly are the terms?
#13
03/10/2002 (3:26 am)
uhh..
www.fmod.org/
they will share the details under license ..
#14
03/10/2002 (3:42 am)
That post sounded confusing, sorry. I meant the mp3 format, not FMod.

Thanks for the link though, it helped me find what I needed.

If you use fmod for a comercial product, you'll have to pay for it. If you use their mp3 decoder for a comercial product, and it sells more than 5,000 copies, then you'll have to by a different license since the mp3 format is copyrighted.

www.mp3licensing.com
#15
03/10/2002 (7:13 am)
But for a freeware title, this is cool?

Might implement this for grins till they add full blown music support in Torque. Be nice to have music in the game, will distract me from all those collision bugs I keep finding in my models :)