client-options: add client-sync option to allow disabling client synchronization

This commit is contained in:
jean-emmanuel 2022-10-17 20:17:16 +02:00
parent 5df9c436b2
commit 1eec9833f0
5 changed files with 14 additions and 2 deletions

View file

@ -27,6 +27,8 @@ var Osc = class Osc extends EventEmitter {
} else {
if (CLIENT_SYNC === 0) data.noSync = 1
ipc.send('sendOsc', data)
}
@ -35,7 +37,7 @@ var Osc = class Osc extends EventEmitter {
sync(data) {
ipc.send('syncOsc', data)
if (CLIENT_SYNC) ipc.send('syncOsc', data)
}
@ -65,6 +67,8 @@ var Osc = class Osc extends EventEmitter {
receive(data){
if (data._rawTarget && CLIENT_SYNC === 0) return
if (typeof this.remoteControl.exists === 'function' && this.remoteControl.exists(data.address)) this.remoteControl.exec(data.address, data.args)
var [widgets, restArgs] = widgetManager.getWidgetByAddressAndArgs(data.address, data.args)