From a0f55bfcb5bf7bba5acbce91f075b7c6516c04b1 Mon Sep 17 00:00:00 2001 From: Bruno Herbelin Date: Sat, 15 Oct 2022 19:06:52 +0200 Subject: [PATCH] Added Fading target for OSC session --- ControlManager.cpp | 9 +++++++++ ControlManager.h | 1 + 2 files changed, 10 insertions(+) diff --git a/ControlManager.cpp b/ControlManager.cpp index 6daca29..cbe3f8f 100644 --- a/ControlManager.cpp +++ b/ControlManager.cpp @@ -858,6 +858,15 @@ bool Control::receiveSessionAttribute(const std::string &attribute, } send_feedback = true; } + else if ( attribute.compare(OSC_SESSION_FADE) == 0) { + float v = 0.f, t = 0.f; + arguments >> v; + if (arguments.Eos()) + arguments >> osc::EndMessage; + else + arguments >> t >> osc::EndMessage; + Mixer::manager().session()->setFadingTarget(v, t); + } #ifdef CONTROL_DEBUG else { Log::Info(CONTROL_OSC_MSG "Ignoring attribute '%s' for target 'session'", attribute.c_str()); diff --git a/ControlManager.h b/ControlManager.h index 74d0882..2fc54d8 100644 --- a/ControlManager.h +++ b/ControlManager.h @@ -59,6 +59,7 @@ #define OSC_SESSION "/session" #define OSC_SESSION_VERSION "/version" +#define OSC_SESSION_FADE "/fade" #define OSC_MULTITOUCH "/multitouch"