lovr icon indicating copy to clipboard operation
lovr copied to clipboard

Upgrade phonon to v4

Open bjornbytes opened this issue 4 years ago • 1 comments

Happening on phonon-v4 branch.

bjornbytes avatar Aug 16 '21 17:08 bjornbytes

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 iplSimulatorRunDirect or iplSimulatorRunReflections which 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.

bjornbytes avatar Aug 16 '21 17:08 bjornbytes