Game Development Community

Sounds won't play! (2D OGG)

by Timothy Volpe · in Torque Game Engine Advanced · 04/02/2010 (12:17 pm) · 3 replies

My 2D .ogg sounds won't play. They are meant to play so only the client can here them, its not something in the game. Its supposed to play in the play GUI, for single player, but it won't work. Heres what I've been trying, I'm wondering if I'm doing it wrong:

datablock AudioProfile(AdMusic2D)
{
   filename = "./Music/menuSong1.ogg";
   is3D = 0;
   isLooping = 1;
   loopcount = 1;
   type = 8;
   volume = 1;
};

function startG1Music()   
{   
    alxStop(AdMusic2D);   
    alxPlay(AdMusic2D);         
}

I don't get any errors at all. It compiles, and then when I use the function, theres no console errors. But nothing happens, no sound! I can here other sounds perfectly! Maybe the datablock is wrong? Because I'm pretty sure its from an older version of Torque, I'd have to ask the guy who sent the datablock.

So, what did I do wrong, and how can I fix it?


#1
04/02/2010 (12:44 pm)
Change alxStop and alxPlay to sfxStop and sfxPlay. The alx commands were deprecated in TGEA 1.7 when a new sound abstraction layer was added.
#2
04/02/2010 (12:44 pm)
Oh! Thanks!
#3
06/18/2011 (6:22 am)
haha, thanks too