FNA-XNA / FAudio

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

Add support for (custom) HRTF #303

Open returntoreality opened 1 year ago

returntoreality commented 1 year ago

Having a HRTF would allow more accurate hearing of the sound origins. OpenAL-soft allows supplying a custom HRTF to fine tune the HRTF to your own head.

This might be related to #42.

flibitijibibo commented 1 year ago

This needs to be implemented first:

https://learn.microsoft.com/en-us/windows/win32/api/hrtfapoapi/nf-hrtfapoapi-createhrtfapo

ThreeDeeJay commented 5 months ago

Does hrtfapo support custom HRTF though? From what I've seen, it just loads some binary/encrypted HRTF files that sound awful (I think it's what Windows Sonic uses) from the system folder and I don't know if they can be edited/replaced (maybe buying and selecting Dolby Atmos for Headphones, its personalized HRTF beta or DTS Headphone:X)

apparently XAudio 2 could be capable of 3D audio. I just found out that the HRTF files I mentioned on my previous message aren't just Sonic's but also XAudio 2 HRTF XAPO's. If I rename "C:\Windows\System32\DefaultHrtfs.bin", Spatial audio sample prints an error and Managed XAudio2 Hrtf Test as well as Spatial Sound tests here refuse to run. https://github.com/kcat/openal-soft/issues/586#issuecomment-1399231118

Also, didn't FAudio already support OpenAL Soft output at some point or did it replace it in FNA? And would you happen to know the reason why Unreal Engine ~4.24(?) onwards would break X3DAudio HRTF? It allowed adding 3D HRTF on older builds by replacing x3daudio1_7.dll, but apparently there was a big change and I noticed FAudio was eventually implemented, unless there's a way to bring back X3DAudio in newer UE builds or I'm missing something 🤔

mirh commented 5 months ago

FAudioDevice wasn't eventually implemented, it was always there to begin with (hell, it was there 15 years ago). With the same token the libsceaudio3d/libAudio3d backend should have something to do with Aureal, lol. And then, UE4 has the source available.. it should be a pretty mechanical process to bisect the culprit.

Also, didn't FAudio already support OpenAL Soft output at some point or did it replace it in FNA?

Never, you are perhaps thinking of wine implementing xaudio2_7 on top of openal before 4.3.