diff --git a/source/backend/plugin/CarlaPluginJuce.cpp b/source/backend/plugin/CarlaPluginJuce.cpp index 69e444687..cb1d67595 100644 --- a/source/backend/plugin/CarlaPluginJuce.cpp +++ b/source/backend/plugin/CarlaPluginJuce.cpp @@ -438,6 +438,7 @@ public: clearBuffers(); + fInstance->enableAllBuses(); fInstance->refreshParameterList(); uint32_t aIns, aOuts, mIns, mOuts, params; @@ -446,9 +447,9 @@ public: bool needsCtrlIn, needsCtrlOut; needsCtrlIn = needsCtrlOut = false; - aIns = (fInstance->getTotalNumInputChannels() > 0) ? static_cast(fInstance->getTotalNumInputChannels()) : 0; - aOuts = (fInstance->getTotalNumOutputChannels() > 0) ? static_cast(fInstance->getTotalNumOutputChannels()) : 0; - params = (fInstance->getNumParameters() > 0) ? static_cast(fInstance->getNumParameters()) : 0; + aIns = std::max(fInstance->getTotalNumInputChannels(), 0); + aOuts = std::max(fInstance->getTotalNumOutputChannels(), 0); + params = std::max(fInstance->getNumParameters(), 0); if (fInstance->acceptsMidi()) { diff --git a/source/discovery/carla-discovery.cpp b/source/discovery/carla-discovery.cpp index e55aa4399..f11443903 100644 --- a/source/discovery/carla-discovery.cpp +++ b/source/discovery/carla-discovery.cpp @@ -1457,8 +1457,12 @@ static void do_juce_check(const char* const filename_, const char* const stype, { carla_juce_idle(); + instance->enableAllBuses(); instance->refreshParameterList(); + audioIns = instance->getTotalNumInputChannels(); + audioOuts = instance->getTotalNumOutputChannels(); + parameters = instance->getParameters().size(); if (instance->hasEditor())