Game Development Community

How do I do basic positional audio in Torque 2D? Please help

by Dan T. · in Torque Game Engine · 09/28/2006 (9:41 am) · 2 replies

Is there any way I can make sounds pan in stereo using Torque 2D?
Is it possible to add audio effects and 5.1 positioning?

The documentation on this is non-existant but surely the sound
engine must be slightly more robust than just being able to play
or loop a sound?

Thanks,
Dan.

#1
09/28/2006 (11:14 am)
Well this will be kind of difficult. You are basically going to need to make some OpenAL calls to change the sound position. They'll all use 3d coordinates, so you can either pass in 0 for the z, or make use of it, whichever you want. In Torque, the sceneobjects manage their own audio handles to move the sounds and such. As you can probably imagine, that is not useful functionality for most 2d games, so we didn't do it. Does that help any?
#2
09/28/2006 (11:29 pm)
Thanks, Pat. That doens't sound too hard. :)
Where would I find information on how to make the OpenAL calls using Torque 2D's script language?
Cheers,
Dan.