Brainache
Member
|
Sounds, part 2
Hey there,
I am using the SoundPlay function to play footsteps sounds for a horde of npc's moving around...
I am using the following function:
SoundPlay("../Data/Sound/footsteps/grass/step1.wav",pos(),0.5,0.5);
I am also using:
Listener.pos(wData.Player->pos());
Listener.orn(wData.Player->lookDir());
Listener.update();
To update the listener position... the 3d positioning appears to be working correectly...
However, there is a constant "fluttering" type of sound playing at a low volume.... and at no point does the sound stop completely...
Ie: no matter how far i move from the group of npc's... the sounds is always there..
Is there a limit to the number of 3d sound that can be played? Am I doing anything incorrectly using this approach?
Thanks!
|
|
05-09-2009 07:45 PM |
|
Esenthel
Administrator
|
Re: Sounds, part 2
Hi,
Currently the 3D sounds don't fade out completely,
Please check this DirectX documentation on the sound volumes http://msdn.microsoft.com/en-us/library/...S.85).aspx
the parameter of 'range' in EE stands for 'minimum distance' in DirectX
If you'd like the sounds to don't play at all at long ranges,
you can add a simple 'if'
if(distance of the sound from the listener <= 100 ) // meters
{
SoundPlay(..)
}
I'll add a method for accessing the current Listener position in the next engine version
|
|
05-10-2009 11:36 AM |
|
Brainache
Member
|
Re: Sounds, part 2
Great - that explains alot... using the distance filter stopped the fluttering sounds... thanks!
|
|
05-10-2009 06:41 PM |
|