From 4a7fc6dc96c5f339ece3f11f81fd5456517a8b0c Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 14 Jun 2020 19:48:26 +0100 Subject: [PATCH] Support custom "/nsm/gui/client/save" for jack-apps Signed-off-by: falkTX --- source/backend/plugin/CarlaPluginJack.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/source/backend/plugin/CarlaPluginJack.cpp b/source/backend/plugin/CarlaPluginJack.cpp index 181953ac0..9fcfd9bda 100644 --- a/source/backend/plugin/CarlaPluginJack.cpp +++ b/source/backend/plugin/CarlaPluginJack.cpp @@ -229,9 +229,12 @@ protected: method, message, smName, features); maybeOpenFirstTime(); + return 0; } - else if (std::strcmp(path, "/reply") == 0) + CARLA_SAFE_ASSERT_RETURN(fOscClientAddress != nullptr, 0); + + if (std::strcmp(path, "/reply") == 0) { CARLA_SAFE_ASSERT_RETURN(std::strcmp(types, "ss") == 0, 0); @@ -269,6 +272,14 @@ protected: 0, 0, 0.0f, nullptr); } + // special messages + else if (std::strcmp(path, "/nsm/gui/client/save") == 0) + { + CARLA_SAFE_ASSERT_RETURN(std::strcmp(types, "s") == 0, 0); + + lo_send_from(fOscClientAddress, fOscServer, LO_TT_IMMEDIATE, "/nsm/client/save", ""); + } + return 0; } #endif