Menu Music
by Edward Smith · in Torque Game Engine · 04/15/2002 (2:41 am) · 10 replies
I was thinking how can I put music in to the Menu and play until player exits or the mission starts?
Thx!
Edward Smith
Thx!
Edward Smith
About the author
Currently working on a WW2 FPS game.
#2
04/15/2002 (10:52 am)
Wav or MP3?
#3
Thx!
Edward Smith
04/15/2002 (6:46 pm)
Well .wav would be easyer I think...but doesn't really matter.Thx!
Edward Smith
#4
I'm not, so I'll be waiting for Ogg Vorbis (i'm not a sound guy!) and until then I'll use my nice lil' wavs.
04/15/2002 (6:49 pm)
mp3 won't be something you'll want to use unless you're making a free game. Retail games have fairly hefty costs with mp3 use.I'm not, so I'll be waiting for Ogg Vorbis (i'm not a sound guy!) and until then I'll use my nice lil' wavs.
#5
04/19/2002 (11:04 pm)
yeah wavs are better I think because there faster also.
#6
04/21/2002 (8:07 pm)
have you got that code?
#7
05/13/2002 (11:16 am)
Bump
#8
05/20/2002 (11:01 am)
bumpity bump bump
#9
But with Ogg Vorbis, you simply define an AudioProfile, e.g in mainMenuGui.gui, just like this:
05/20/2002 (11:14 am)
I don't see the problem here... I've added the Ogg Vorbis support (see resources) to Torque, and you can play a sound file anytime you want... and this should work with wavs, too... (not sure, haven't tested yet...)But with Ogg Vorbis, you simply define an AudioProfile, e.g in mainMenuGui.gui, just like this:
new AudioProfile(Mission_Music) {
fileName = "~/data/sound/music/Track09.ogg";
description = "AudioMusic";
preload = "0";
};and then, e.g. in init.cs, loadMainMenu() (or whereever you want...), play the sound:function loadMainMenu()
{
// Startup the client with the Main menu...
Canvas.setContent( MainMenuGui );
Canvas.setCursor("DefaultCursor");
alxPLay("Mission_Music");
}So, if it doesn't work with wavs (and/or you want to have much smaller file sizes), add the Ogg Vorbis resource and everything should be fine :-)
#10
That's a resource that should be approved in the next couple of days. Should work with both Ogg Vorbis and .wav files assuming you've added the Ogg Vorbis code linked to from the resource.
05/20/2002 (11:31 am)
Playing music in game / menuThat's a resource that should be approved in the next couple of days. Should work with both Ogg Vorbis and .wav files assuming you've added the Ogg Vorbis code linked to from the resource.
Torque Owner Matt W