I’m trying to make the Doppler effect work but I’m kinda confused how I should use the factors.
I get the position of the camera and the source in each frame (by frame I mean the same rate as the FMOD system update gets called), I also get the elapsed time and calculate both the listener and the source velocity.
The position of the sound and listener is considered to be in distance units of the world space of my engine, so I set the distance factor in set3DSettings to be 1.0f, which I suppose is reasonable. In each frame, I first set the source and listener properties and then I call the FMOD system update.
I didn’t know what I should choose for the Doppler scale factor, so I thought may be I should tune it manually to get the best result.
So here is what happens. When I choose the Doppler factor more than (10^(-5)), The sound gets destroyed as the listener moves toward and backward (with respect to the source).
When I choose it to be 10^(-5), I hear a little bit of of sound change as the listener moves, but it’s not what I’m looking for.
Is there anything that I’m missing? I’m pretty sure that the Doppler scale shouldn’t be that low.
Thank you for your help.