Skip to content

Local Update Cooldown Fix

Compare
Choose a tag to compare
@jmkao jmkao released this 12 Dec 23:55
· 20 commits to main since this release

When a local change (either via MIDI fader or UI) updates the OBS volume, that change is bounced back to the originating UI via the websocket callback for volume updates.

Previously, each time a local change is made, a flag is set to ignore the next websocket update in order to not create any potential loops. However, this mechanism is imperfect because a remote OBS Studio is subject to network delays and several updates may be issued before the websocket update comes back, resulting in several remote updates coming back to the UI in a batch.

This is has no impact on the UI based fader, but MIDI faders will lose their lock frequently in this case.

The logic has been changed so rather than ignoring the next update, a 300ms cooldown timer is created so that remote updates will be ignored for the next 300ms since they are presumed to be the local UIs own updates being reflected back.