Add support for (custom) HRTF #303

Open
opened 2023-01-31 04:40:33 -06:00 by returntoreality · 3 comments
returntoreality commented 2023-01-31 04:40:33 -06:00 (Migrated from github.com)

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.

Having a HRTF would allow more accurate hearing of the sound origins. [OpenAL-soft](https://github.com/kcat/openal-soft) allows supplying a custom HRTF to fine tune the HRTF to your own head. This might be related to #42.
flibitijibibo commented 2023-01-31 06:35:14 -06:00 (Migrated from github.com)
This needs to be implemented first: https://learn.microsoft.com/en-us/windows/win32/api/hrtfapoapi/nf-hrtfapoapi-createhrtfapo
ThreeDeeJay commented 2024-02-03 04:10:38 -06:00 (Migrated from github.com)

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 🤔

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](https://professional.dolby.com/phrtf/) or DTS Headphone:X) > apparently XAudio 2 could be capable of 3D audio. I just found out that the [HRTF files](https://i.imgur.com/YmIIwT4.png) I mentioned on my previous message aren't just Sonic's but also [XAudio 2 HRTF XAPO](https://developer.microsoft.com/it-it/windows/holographic/spatial_sound_in_directx)'s. If I rename "C:\Windows\System32\DefaultHrtfs.bin", [Spatial audio sample](https://airtable.com/shrpPCOJwJiA8T8Hr/tbl3TyLn23qfBWZTz/viwEFl4VhIITjGRw1/recfK1LO6UOZPON4u) prints an [error](https://i.imgur.com/kbYgXOx.png) and [Managed XAudio2 Hrtf Test](https://airtable.com/shrpPCOJwJiA8T8Hr/tbl3TyLn23qfBWZTz/viwEFl4VhIITjGRw1/recRkSfq6dSTmfGaS) as well as [Spatial Sound tests here](https://github.com/ThreeDeeJay/Xbox-ATG-Samples/releases) 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](https://github.com/ThreeDeeJay/x3daudio1_7_hrtf/releases/latest)? 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](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Engine/FAudioDevice/), unless there's a way to bring back X3DAudio in newer UE builds or I'm missing something 🤔
mirh commented 2024-02-03 05:48:03 -06:00 (Migrated from github.com)

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.

FAudioDevice wasn't _eventually_ implemented, it was always there to begin with (hell, it was there [15 years ago](https://web.archive.org/web/20080305092901/http://udn.epicgames.com/Three/AudioSystem.html#Reverb%20Effects)). 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.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-FNA-XNA/FAudio#303
No description provided.