Game Development Community

OpenSnd problem

by Blackcode · in Technical Issues · 05/28/2007 (11:30 am) · 2 replies

Hello every one,

when I try to call the command "OpenSnd" the engine crash any idea ? here is the code:

%whichdoor.openSnd = %whichdoor.playAudio(0, doorStartOpenSwingSnd);

//sound proifle
datablock AudioProfile(doorStartOpenSwingSnd)
{
fileName = "~/data/sound/door1_move.wav";
description = AudioOpen3d;
preload = true;
};
==================================================

thanks

#1
05/28/2007 (1:59 pm)
I haven't seen triggered sounds used that way, but here's how I did it:

datablock AudioProfile(GateOpen)
{
   filename = "~/data/sound/doorslide1.wav";
   description = "Audio2D";
	preload = false;
};

Then in my door open trigger, I just put:
alxPlay( "GateOpen" );
It works. Also, you have an AdioOpen3d for an audio discription? Is there an actuall discription for that? If not, it'll crash becouse torque doesnt know how to play the sound. I just use a 2d sound for doors.
#2
05/28/2007 (2:25 pm)
And how I use 3D sound I got this code from the book GPAIO

thanks any way I will use the book forum