Xact itself does not contain 3d sound effects, and the related functions are completed by x3daudio.
At the time of encapsulation, I did not notice any parameters for adjusting the distance attenuation.
After reading the SDK documentation, we found that the pvolumecurve and curvedistancescaler parameters of x3daudio_emitter are used for attenuation.
However, the SDK documentation is wrong (march2008, the latest is OK), so I am depressed for a long time.
In fact, when pvolumecurve is null, curvedistancescaler is still valid, but you need to set it in the xact tool:
Of course, you can also create more complex effects, but it is generally not used. below is the curve of the engine sound tone changing with speed ^_^
In actual use, it is found that 3D volume attenuation does not work at the beginning of playback, and the time difference is approximately equal to the Update Interval of ixact3engine (dowork). The update interval recommended by the SDK is 30 ~ 100 ms. I did not expect this to cause problems. because my cue xact3dapply is called with dowork, so the information of the transformation matrix is not updated in time, so the correct 3D sound effect is calculated only during the next update of the audioengine.
Solution: Update (xact3dcalculate, xact3dapply) immediately after cue play starts.