dagargo / overwitch

JACK client for Overbridge devices
GNU General Public License v3.0
127 stars 15 forks source link

Fix JACK audio disconnection of device inputs #15

Closed dagargo closed 2 years ago

dagargo commented 2 years ago

In 887f18e39397f7fa22a04848467ed18d4f1aa5b8, only writing to the j2o ring buffer was performed if there were inputs connected.

This works well but if we later disconnect the inputs, the OB end keeps reading and resampling from the queue, what creates a noisy and undesirable output.

dagargo commented 2 years ago

Fixed in 75c9970d52318be2a35387caa59c02b8cc00a37d.

Instead of checking the status of the input ports in every loop, we use a member of the overbridge struct to indicate this.

Then, this variable is used to bypass both ends of the j2o audio side.

o2j audio is always available and so is MIDI both ways.