zonkmachine wrote: ↑Fri Jun 13, 2025 3:46 pm
When a ship is hit for instance. The sound would travel via hull/atmosphere/(shield?), depending on the weapon/hit, to the cabin. In a real world scenario you would experience this in 3D. The way we experience up/down (3D) in hearing is through something called 'spectral cues'. I learned about 3D sound in this video from youtuber Smarter Every Day,
https://www.youtube.com/watch?v=Oai7HUqncAA, in which an adult engineer stuffs play dough into the ears of his son in the name of science.
Yep, these spectral cues are partly what is captured by the HRTF (head related transfer function). This method is only really effective with headphones though. To keep the topic narrow, I didn't go into detail regarding the lore. An idea from the top of my head: there could be a ship-installable equipment module that would provide this "simulated" audio in space. Also, it could be cool for immersion to deduce settings of the audio engine (e.g. speed of sound) from the game environment, such as air pressure. But first we need the tech for this.
sturnclaw, thank you for the answer and confirmation!
Keep in mind that any library chosen here would have to be compatible with Pioneer's GPLv3 licensing, so you're looking at a fully-permissible license (MIT, BSD, Apache, ZLib) or a GPL variant.
OK, noted.
From your post, I read that you find OpenAL Soft an acceptable dependency, with some caveats regarding integration. Here are my two cents on the matter:
The README of OpenAL Soft is somewhat misleading, since it only lists source install and vcpkg (which is also a wrapped source install) as ways to integrate the library. This may be true for the HEAD, but also they publish release artifacts for Windows (we can directly use that to link against and redistribute). For Linux distributions, more-or-less recent dev versions of the library are also found in the system repositories (
https://repology.org/project/openal-soft/versions). Note, that the basic interface of OpenAL is quite narrow, and more esoteric features are implemented as extensions. The availability of the extensions can be queried at runtime, therefore I wouldn't be particularly afraid of coding against the latest release, and letting Pioneer to link against an older version on some distributions.
If in any case we'd need to do an in-tree build: here are some numbers to go by. On my PC, using Ninja (multi-threaded build) Pioneer builds in 57s, while OpenAL Soft builds in 11s (without pruning off the build of tests, examples and unneeded backends). A significant addition, but does not a change in the order of magnitude.
I agree with your point about Stream Audio.
I'm not a big fan of the idea of adding HRTF support to SoLoud, mostly due to this being a bit too much work in addition to updating Pioneer's audio backend. I don't see HRTF data itself a concern, if nothing else, we can use the
MIT dataset from 1994. An alternative would be to just go with SoLoud, and defer HRTF. However, at the current moment I see that more value (player audible features) could be gained from using OpenAL Soft, even if it is somewhat more difficult to integrate.