Game Development Community

Audio Emitters

by Louis Dufresne · in General Discussion · 01/02/2004 (11:43 am) · 75 replies

I am trying to place an audio emitter in my world. While the emitter is there, no sound plays when I come near it. I load up the world editor and simply click on the sound box and then the emitter starts to play. Anyone know of a way to fix this? Ive tried everything I can possibly think of.
Page«First 1 2 3 4 Next»
#61
07/27/2005 (5:53 pm)
Hmm are you using Torque1.3 SDK audio ? , i ask because of this line
minDistance = "20";
What i remember this line comes from 1_2_2 or something.
My suggestion is upgrade the Audiofiles to 1.3sdk ,because this working with your wave file, without any problems.
#62
07/27/2005 (7:36 pm)
I have been seeing this same issue.

I was playing around with the DEMO, and attached the Heaveyrain sound to one of the little huts.

The first time, when i walked in...i heard rain (really cool =).

But anyother time i have tryed this, nothing.

I played with one of the turoials on "Sound emeters" and, got nothing.

Im a Noob, so this may be why, but *shrug*
#63
07/27/2005 (8:27 pm)
Try this one , I think there is a problem with the data,
Its best to let it use the known working profile and description,
I made a standard emiter in the editor ,
gave it a profile and set to use profile description.
Then went back and commented out the unneeded bits to be sure.
new AudioEmitter() {
      position = "-128.534 -82.981 200";
      rotation = "1 0 0 0";
      scale = "1 1 1";
      profile = "flayer";
      useProfileDescription = "1";

      //fileName = "0";
      //type = "2";
      //volume = "1";
      //outsideAmbient = "1";
      //referenceDistance = "1";
      //maxDistance = "100";
      //isLooping = "1";
      //is3D = "1";
      //loopCount = "-1";
      //minLoopGap = "0";
      //maxLoopGap = "0";
      //coneInsideAngle = "360";
      //coneOutsideAngle = "360";
      //coneOutsideVolume = "1";
      //coneVector = "0 0 1";
         //minDistance = "20.0";
#64
07/27/2005 (9:56 pm)
Na that didn't work. Im trying it on another computer now so I know its not a driver issue. Now what happens is during the loading phase it starts to play but after it loads it shuts off. If you go into world editor click on the emitter and apply then it works perfect. The engine just can't seem to figure out to load the sound when I start the mission and to play it when your within distance. I have no idea why
#65
07/28/2005 (12:03 am)
Hmm,Id say it must be your AudioProfile
datablock AudioProfile(flayer){
filename = "~/data/sound/fx/flayer.wav";   
description = "AudioLooping2d";   
preload = false;};

change it to
datablock AudioProfile(flayer){
filename = "~/data/sound/fx/flayer.wav";   
description = "AudioLooping2d";   
preload = True;};
#66
07/28/2005 (9:58 am)
@Brice
what version of Torque are you using ?
#67
07/28/2005 (12:34 pm)
I have exactly the same problems like Brice and i am using the Realm Wars Version.
#68
07/28/2005 (6:13 pm)
CHanging preload to true didnt do anything. Torque version 1.3
#69
07/28/2005 (6:30 pm)
Try this
Dont use profile or description .
new AudioEmitter() 
{
      position = "443.291 88.888 223.834";
      rotation = "1 0 0 0";
      scale = "1 1 1";
      fileName = "~/data/sound/fx/flayer.wav";
      useProfileDescription = "0";
      outsideAmbient = "1";
      volume = "1";
      isLooping = "1";
      is3D = "1";
      referenceDistance = "5";
      maxDistance = "50";
      coneInsideAngle = "360";
      coneOutsideAngle = "360";
      coneOutsideVolume = "1";
      coneVector = "0 0 1";
      loopCount = "-1";
      minLoopGap = "3000";
      maxLoopGap = "6000";
      type = "2";
      locked = "true";  
 };
#70
07/29/2005 (12:14 pm)
It works partial.
But there are long recesses between the repeats of the sound.
Therefore i have put 10 audioemitters into my map instead of 2 or 3 ;)
#71
07/29/2005 (12:57 pm)
Ye but change the min and max loopgap or set them to 0.
It was only an example.
#72
07/29/2005 (1:54 pm)
Quote:Now what happens is during the loading phase it starts to play but after it loads it shuts off. If you go into world editor click on the emitter and apply then it works perfect.

What you have is during loading, a command somewhere is stopping all sound and then sounds loaded after that command work.
#73
07/30/2005 (9:24 pm)
It's working okay now, its kinda glitchy but better. Thnx for the help
#74
06/14/2006 (5:35 pm)
For some reasion, placing a emmiter works just fine when it s created in the editor(no profiles, just using the entrys in the editor for them). But, if you copy the datablocks and place it in the mission file, they do not work.

Whats up with this?

i get

AudioEmitter::onAdd: client failed initial update!
AudioEmitter::update: failed to create source!
#75
09/12/2007 (3:39 pm)
Before you start make sure you have the sound files you want converted to OGG or WAV and placed in the sounds folder of what ever mission pack you are trying to implement your sounds in.

Step One:
Open up Torque 3D/Game Engine, load a mission, and turn on the mission editor by pressing F11 (Apple F11 on Mac/Apple).

Step Two:
Select F4 to access the World Editor Creator, and select Mission Objects, Environment, and Audio Emitter.

Step Three:
When the Building Object: Audio emitter window pops up give your object a simple name like test. Then select a SOUND PROFILE, preferably the "takeme" sound profile since it is set to AudioDefaultLooping3d. Leave your SOUND DESCRIPTION, AUDIO FILE, and USE PROFILE'S DESCRIPTION blank.
*Torque v1.4.1 (what I used) automatically sets the Audio file to button. Leave as is.*

Step Four:
Leave your Volume, Looping?, and is 3D sound, at its default settings. Adjust your Max Distance to 5. This will ensure that the player has to get right up on the Audio Emitter to "trigger" the sound. Leave the "Cone" settings alone for now. Go to the next step.

Step Five:
* This is the most important step to get the device working!!!
Loop count should stay set at -1 to ensure your sound plays every time the player steps on or into it.
Min loop gap (ms) - Needs to be set to 1.
Max loop gap (ms) - Needs to be set to 1.
Audio type remains set at 2.

Step Six:
SAVE YOUR MISSION!!!!!


Errors and Troubleshooting:

If all the steps have been performed correctly your "trigger" should work properly. Incase of any errors try these solutions.

Sound Does Not Play
Make sure your sound file is set to OGG or WAV format. OGG works better though.
Ensure that your Min and Max loop gap is set to 1. See Step Five.
Try setting up a new Audio Emitter using Steps Two through Four.

"Trigger" Sounds play outside of play field
If this is happening delete the current Audio Emitter and set up a new Audio Emitter. ENSURE THAT MIN AND MAX LOOP ARE BOTH SET TO 1.

Sound does not play immediately
This is usually not an error, but due to how large your sound file is that needs to be loaded. The larger the file the longer the load time since we have not preloaded the sounds in the audio profile scripts. To get it to load faster click the Audio Emitter box. It should turn green and you should hear sound. If not you may not have your sound loaded onto the emitter. Repeat steps two through four. If the problem continues check the GarageGames forum for Audio Emitters/Triggers or refer to A Game Programmers guide to Torque, if you have a copy.

Again this is an alternative solution to writing the trigger code in the script files. I recommend using sound files under 30KB for quick loading and response time.

Submitted by,

Shawn Funches
AIU-Dunwoody Student
Page«First 1 2 3 4 Next»