FNA-XNA / FAudio

FAudio - Accuracy-focused XAudio reimplementation for open platforms
https://fna-xna.github.io/
Other
548 stars 73 forks source link

Implement CALCULATE_DELAY flag #42

Open flibitijibibo opened 5 years ago

flibitijibibo commented 5 years ago

For the first release of FAudio we focused on what FNA and XACT needed, but now that this is looking to go into a whole lot more games we should look at the rest of the X3DAudio features.

The stubs are here:

https://github.com/FNA-XNA/FAudio/blob/master/src/F3DAudio.c#L1538

Don't expect a whole lot of information out there - the MSDN docs are completely useless and many months of looking for existing research on this turned up completely and entirely empty. If you're working on this, it's because you REALLY know what you're doing (I certainly don't).

Checklist:

flibitijibibo commented 5 years ago

I'm the biggest idiot ever. The emitter structure clearly shows all the curves together for volume as well as all the LPF/reverb calculation, so you just use the same attenuation process with different defaults:

https://github.com/FNA-XNA/FAudio/commit/eca636110ef52f6720b8b2967807905a13f7d9da

Delay is still a mystery to me, but it seems like it's only useful in stereo and only when you have a delay XAPO attached, which... I don't think applies to any of the built-ins, in the way that the delay times are laid out? I'd say it's useful for HRTF maybe but even the 2.9 HrtfApo doesn't seem to care about it. Kind of makes me wonder how much that feature is really worth.