From 27f6d106770e931beef8b47d80bf7c0b5cc29d2a Mon Sep 17 00:00:00 2001 From: arc-alex Date: Sun, 26 Nov 2023 20:41:01 +0100 Subject: [PATCH] actually disable/enable osc output --- .../src/services/integration-service/OscIntegration.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/server/src/services/integration-service/OscIntegration.ts b/apps/server/src/services/integration-service/OscIntegration.ts index f9c730a28..8c3071cf5 100644 --- a/apps/server/src/services/integration-service/OscIntegration.ts +++ b/apps/server/src/services/integration-service/OscIntegration.ts @@ -26,7 +26,15 @@ export class OscIntegration implements IIntegration { * Initializes oscClient */ init(config: OSCSettings) { - const { targetIP, portOut, subscriptions } = config; + const { targetIP, portOut, subscriptions, enabledOut } = config; + + if (!enabledOut) { + this.oscClient?.close(); + return { + success: false, + message: 'OSC output disabled', + }; + } this.initSubscriptions(subscriptions);