Browse Source

Fix for some juce-based plugins having 0 audio ports

Closes #1084

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.2.0-RC1
falkTX 4 years ago
parent
commit
0ebb8d86b2
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 8 additions and 3 deletions
  1. +4
    -3
      source/backend/plugin/CarlaPluginJuce.cpp
  2. +4
    -0
      source/discovery/carla-discovery.cpp

+ 4
- 3
source/backend/plugin/CarlaPluginJuce.cpp View File

@@ -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<uint32_t>(fInstance->getTotalNumInputChannels()) : 0;
aOuts = (fInstance->getTotalNumOutputChannels() > 0) ? static_cast<uint32_t>(fInstance->getTotalNumOutputChannels()) : 0;
params = (fInstance->getNumParameters() > 0) ? static_cast<uint32_t>(fInstance->getNumParameters()) : 0;
aIns = std::max(fInstance->getTotalNumInputChannels(), 0);
aOuts = std::max(fInstance->getTotalNumOutputChannels(), 0);
params = std::max(fInstance->getNumParameters(), 0);

if (fInstance->acceptsMidi())
{


+ 4
- 0
source/discovery/carla-discovery.cpp View File

@@ -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())


Loading…
Cancel
Save