I’m currently working on 3d positional audio in my 3d XNA game (using SoundEffectInstance), however I’m having troubles finding the correct values of the position of the emitter and listers.
I started out setting the position of my listener to the camera position(it’s a first person game), and the position of the various emitters to the position of the object that was emitting the sound. Doing this muted the sound completely, compared to before I used the Apply3D method.
I did some experimenting with the values, and figured after I made the values of the positions much much smaller, I started hearing the sound. My map size has values from 0 to 5000 in the x/z plane (only moving between 0 and ~500 on y axis), so the distance between the listener and emitter will generally be high (when comparing to the values I needed to hear anything at all which was between 0 and 1).
Is there any way to control what “close” and “far away” is for the soundEffectInstance? Or am I supposed to normalize the distance values? I read trough several guides on 3D sound, but I have not seen anything related to normalizing or control of the distance values.
After some more testing, I found that simply dividing the position values with a factor (arround 500 seems right for me) provides a good result. I dont know if this is the way It’s supposed to be done, but it seems to be working fine.