Skip to content

spawn thread per device

Lennart Melzer requested to merge feature/22-thread-per-device into main

This PR will create a thread for every device whenever a ugen wants to use it (i.e. it is based on !23 (merged) to allow on-demand treadmills)

Handles cases when you change the device id of a UGen during its runtime: it removes itself as a user of the former device and adds itself to the new one. It sanitizes all incoming deviceIndex values from ugens by first flooring and then clamping them to the range 0..SC_OMEGA_MAX_DEVICES (which is currently 2).

TODO this does not yet move global force state resetting into cleanup of a treadmill once all users are gone

closes #22

Edited by Lennart Melzer

Merge request reports