lovr
lovr copied to clipboard
Upgrade phonon to v4
Happening on phonon-v4 branch.
phonon significantly restructured the way sources are processed during spatialization. Basically they all get processed in a batch now instead of individually.
- Sources are created and can be added/removed from a "simulator".
- Every audio frame, you set the inputs for each source (transform, effects, settings, etc.). Note that the inputs do not include audio buffers.
- Then you call
iplSimulatorRunDirectoriplSimulatorRunReflectionswhich processes all sources attached to the simulator. - Then you retrieve outputs for each source, which has all the attenuation values, and reverb info.
- These outputs get fed to "effects" which do the actual mixing.
It's a bit different than LÖVR's current spatializer structure, which processes sources one at a time (plus the "tail" for reverb). There may be an opportunity to change the API to process things in a batch, which would match phonon better and might allow for reduced overhead. Not sure what it would look like yet.