From 2a700bfeaee1dd9592f08de5f9f9e53adddec6af Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 17 Sep 2014 17:25:12 +0100 Subject: [PATCH] Don't pass name and osc-url on plugin bridges args, use env vars --- source/backend/plugin/CarlaPluginThread.cpp | 7 ++-- source/bridges-plugin/CarlaBridgePlugin.cpp | 36 ++++++++++----------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/source/backend/plugin/CarlaPluginThread.cpp b/source/backend/plugin/CarlaPluginThread.cpp index 5a557cbd7..b6e35dc29 100644 --- a/source/backend/plugin/CarlaPluginThread.cpp +++ b/source/backend/plugin/CarlaPluginThread.cpp @@ -164,6 +164,8 @@ void CarlaPluginThread::run() sEnvMutex.lock(); + carla_setenv("CARLA_CLIENT_NAME", name.toRawUTF8()); + std::snprintf(strBuf, STR_MAX, "%f", fEngine->getSampleRate()); carla_setenv("CARLA_SAMPLE_RATE", strBuf); @@ -263,16 +265,13 @@ void CarlaPluginThread::run() break; case PLUGIN_THREAD_BRIDGE: - /* osc-url */ arguments.add(String(fEngine->getOscServerPathUDP()) + String("/") + String(fPlugin->getId())); /* stype */ arguments.add(fExtra1.buffer()); /* filename */ arguments.add(fPlugin->getFilename()); - /* name */ arguments.add(name); /* label */ arguments.add(fLabel.buffer()); /* uniqueId */ arguments.add(String(static_cast(fPlugin->getUniqueId()))); - carla_setenv("ENGINE_BRIDGE_SHM_IDS", fExtra2.buffer()); - carla_setenv("ENGINE_BRIDGE_CLIENT_NAME", name.toRawUTF8()); carla_setenv("ENGINE_BRIDGE_OSC_URL", String(String(fEngine->getOscServerPathUDP()) + String("/") + String(fPlugin->getId())).toRawUTF8()); + carla_setenv("ENGINE_BRIDGE_SHM_IDS", fExtra2.buffer()); carla_setenv("WINEDEBUG", "-all"); break; } diff --git a/source/bridges-plugin/CarlaBridgePlugin.cpp b/source/bridges-plugin/CarlaBridgePlugin.cpp index e6eda4726..73b9d365a 100644 --- a/source/bridges-plugin/CarlaBridgePlugin.cpp +++ b/source/bridges-plugin/CarlaBridgePlugin.cpp @@ -376,21 +376,19 @@ int main(int argc, char* argv[]) // --------------------------------------------------------------------- // Check argument count - if (argc != 7) + if (argc != 5) { - carla_stdout("usage: %s