Integration of xact and x3daudio

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.