Blender 2.5: 3D Sound doesn't fade away

Hello everyone,

I’m trying to get the hang of using the Blender 2.5 game engine but I’ve ran into some problems trying to use the sound actuator.

I created an Empty that plays a music file using an Always sensor.

These are the settings for the actuator:

File: testmusic.wav
Volume: 1.00
Pitch: 1.00
3D Sound: True
Minimum Gain: 0.00
Maximum Gain: 1.00
Reference Distance: 1.00
Maximum Distance: 2.00
Rolloff: 2.00
Cone Outer Gain: 0.00
Cone Outer Angle: 360.00
Cone Inner Angle: 360.00

I also converted the ‘testmusic.wav’ file to a mono stream because I thought the problem was caused by the file being a stereo MP3.

I hope to hear from you guys soon! :slight_smile:

Kind regards,

- AniCator

Whoa what??? When did we get this stuff?! I was pumped enough to just get ogg and mp3 support, and now 3D settings as well? :eek:

Interesting what happens when you dont use the BGE for a few months… I need to keep up!

Either way I played around with it for a while, it does kinda work, I got it so the sound got louder as you got closer, and then faded as you moved away again, but I couldn’t get it to fade to 0. It also made the sfx (which was a mono track) 3D, ie when I put the emitter to the side of the camera and then moved in closer (so the camera was at the side of the emitter) I could hear it in the appropriate side of my headphones. So it is truly 3D sound, and very nice indeed.

Now if only someone could work out how to make the settings work so it fades to nothing, and maybe even stops the sound all together (thinking optimizations here so no more sounds are playing than the ones needed at the time), that would rock.

I forgot to note that the panning works for me too. It’s just the fading. I don’t hear any fading at all.

I’m trying to get it to work with 2.57 rc2 and it seems that the same issue exists. I even set the ref dist and max dist both to 0.00 but no change.

Couple things -

  1. You can do the fading yourself; it would be pretty simple - just a simple formula using a distance check.
  2. As AD-Edge mentioned, you can optimize it yourself by simply not triggering the sound when you’re too far away from the sound (and so the sound is at 0 without triggering it).
  3. Audaspace is better when it comes to sound-handling than the built-in BGE sound, in my opinion, BUT there’s no 3D sound (I think).
  4. Also, you could implement fading with a raycast to make sounds fade out faster when behind things like walls or glass. Also, with Audaspace, you might be able to use a filter to make a sound muffled when it is behind an object.

The new 3D sound in the BGE is implemented using the Audaspace C-API (as far as I know). Also, being new it’s probably not tested too well. If you have a file that demonstrates the bug, I’d recommend posting a bug in the bug tracker.

Well, that’s great - that means that I won’t have to use Audaspace, right? Still, Audaspace allows for some cool things, like dynamic sound loading, filters, etc. It’s pretty cool.