FAudio icon indicating copy to clipboard operation
FAudio copied to clipboard

Implement CALCULATE_DELAY flag

Open flibitijibibo opened this issue 5 years ago • 1 comments

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:

  • [ ] F3DAUDIO_CALCULATE_DELAY
  • [x] F3DAUDIO_CALCULATE_LPF_DIRECT
  • [x] F3DAUDIO_CALCULATE_LPF_REVERB
  • [x] F3DAUDIO_CALCULATE_REVERB

flibitijibibo avatar Oct 09 '18 17:10 flibitijibibo

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.

flibitijibibo avatar Nov 01 '18 03:11 flibitijibibo