MP3 question
by Travis Vroman · in Torque Game Engine · 05/23/2003 (8:50 pm) · 2 replies
How can I get an mp3 to play in my game menus? How do I do this. FYI I am a TGE licensee.
-T
-T
#2
Head over to ... to get a too lto convert WAV and MP3 to OGG
the to get it playing you should do something like this:
in one of your scripts like client/scripts/audioProfiles.cs
and to play the song you would use the next call:
simple enought :)
Just check if your version of Torque have the Ogg streaming stuff else search in the resources for OGG streaming or something and implement that resource.
If you have engine/audio/vorbisStream.h file, the Ogg Vorbis streaming is in your copy ( I don't have the latest head so I don't know if it's in there)
EDIT: Forgot to mention...
This is the Ogg Vorbis site http://www.vorbis.com/
and here you can find file converters
http://www.vorbis.com/download_win.psp
OggDrop is easy to use.
05/24/2003 (11:11 am)
Yep, go with Ogg, anycase ...Head over to ... to get a too lto convert WAV and MP3 to OGG
the to get it playing you should do something like this:
in one of your scripts like client/scripts/audioProfiles.cs
new AudioProfile(MenuMusic)
{
filename = "~/data/sound/music/menumusic.ogg";
description = "AudioMusic";
preload = false;
};and to play the song you would use the next call:
alxPlay("MenuMusic");simple enought :)
Just check if your version of Torque have the Ogg streaming stuff else search in the resources for OGG streaming or something and implement that resource.
If you have engine/audio/vorbisStream.h file, the Ogg Vorbis streaming is in your copy ( I don't have the latest head so I don't know if it's in there)
EDIT: Forgot to mention...
This is the Ogg Vorbis site http://www.vorbis.com/
and here you can find file converters
http://www.vorbis.com/download_win.psp
OggDrop is easy to use.
Torque Owner Ben Swanson