0
0

hie…

i’m using fmod in a video game and got some pb with 3D sound

every frame, I check new position of my listener, the orientation and time since last frame.

i use position and time to calcul velocity :
vel[0] = (last[0]-new[0]) * (1000 / dt)
where dt is the time since last frame in ms (like in 3D sample)

FSOUND_Listener_SetAttributs(&pos,&vel, orientation.x, 0, orientation.z, 0, orientation.y, 0)

is there a mistakes in this code????

1- when i move the camera aroud (360°) the sound move from left to right, cool ^^ … but sometime the sound doesn’t follow the camera, i turn and the sound stay on left speaker instead of right :/

2- when i’m walk away from the sound source, the sound decrease normaly, but when i walk more, the sound become very strange and doesn’t look the same at all… and when i coming back near the source, the sound is strange until i come near the source…

(PS : sorry for this poor english :/ )

• You must to post comments
0
0

hmmmm… i don’t know if my orientation forms a unit vector.. i’m gonna look that way.. how must be the vector??? i’m working on a 3D game (third person camera) so i need to use x and z axes for the first orientation (1,0,1) vector and y axes for the second one (0,1,0) ??

for the “strange sound” i found something else… i didn’t really understood the SetMinMaxDistance… i tried to set 0.5 for min and 10 for max, cause i thought that mixer would stop playing the sound after disctance > maxDistance.. but mixer doesn’t stop the sound :/ and when i cross the maxdistance limit the sound become strange.
is FMOD working like that, or is it an other error from me???
(i tried bigger value to maxdistance and it’s sounds better)

is there a way for FMOD to stop playing sound when distance is > to a defined distance?? or need i to write my function for it??

• You must to post comments
0
0

nobody???

• You must to post comments
0
0

Everybody makes that very assumption–’tis why it’s in the docs in the first place. MaxDistance defines at which point the volume level becomes constant, not where it becomes non-audible. (Brett, correct me if I’m wrong here…) As far as I’m aware you have no direct control over when the sound becomes silent–only indirect control based on MinDistance.

• You must to post comments
0
0

yes i know….

i found by myself that i didn’t read corectly the definition for minmaxdistance, sorry :/

but i just wanna know if there is a way to stop a sound after a defined distance or not?? i think i’ll need to progam it (i’ve allready thought about it) but if there a way by FMOD it should be faster ^^ )

brett?? why does the sound become strange after you pass the max distance, i should be at a constant volume no?? is it a problem with the velocity or something like that??

• You must to post comments
0
0

I already stated in my last post that you have no direct control over the distance at which the sound becomes silent; you must’ve missed it. Anyway, I’m guessing the sound becomes strange after maxdistance is passed because of the doppler effect. It happens in the real world, so it’s only correct that it should happen in a 3D environment as well.

• You must to post comments
0
0

oops sorry.. i’ve missed it :/

and about the strange sound, you may be right.. thanks

• You must to post comments
Showing 6 results