Browse Source

Don't allow multi-midi-port plugins in patchbay for now; Cleanup

tags/1.9.6
falkTX 9 years ago
parent
commit
d670f5d1d8
10 changed files with 37 additions and 157 deletions
  1. +37
    -0
      source/backend/engine/CarlaEngine.cpp
  2. +0
    -29
      source/backend/plugin/CarlaPluginBridge.cpp
  3. +0
    -29
      source/backend/plugin/CarlaPluginDSSI.cpp
  4. +0
    -2
      source/backend/plugin/CarlaPluginFluidSynth.cpp
  5. +0
    -9
      source/backend/plugin/CarlaPluginJuce.cpp
  6. +0
    -19
      source/backend/plugin/CarlaPluginLADSPA.cpp
  7. +0
    -29
      source/backend/plugin/CarlaPluginLV2.cpp
  8. +0
    -2
      source/backend/plugin/CarlaPluginLinuxSampler.cpp
  9. +0
    -29
      source/backend/plugin/CarlaPluginNative.cpp
  10. +0
    -9
      source/backend/plugin/CarlaPluginVST2.cpp

+ 37
- 0
source/backend/engine/CarlaEngine.cpp View File

@@ -524,6 +524,43 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype,
if (plugin == nullptr)
return false;

bool canRun = true;

/**/ if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK)
{
/**/ if (! plugin->canRunInRack())
{
setLastError("Carla's rack mode can only work with Mono or Stereo plugins, sorry!");
canRun = false;
}
else if (plugin->getCVInCount() > 0 || plugin->getCVInCount() > 0)
{
setLastError("Carla's rack mode cannot work with plugins that have CV ports, sorry!");
canRun = false;
}
}
else if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
{
/**/ if (plugin->getMidiInCount() > 0 || plugin->getMidiOutCount() > 0)
{
setLastError("Carla's patchbay mode cannot work with plugins that have multiple MIDI ports, sorry!");
canRun = false;
}
else if (plugin->getCVInCount() > 0 || plugin->getCVInCount() > 0)
{
setLastError("CV ports in patchbay mode is still TODO");
canRun = false;
}
}

if (! canRun)
{
delete plugin;
return false;
}

plugin->reload();

#if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE)
plugin->registerToOscClient();
#endif


+ 0
- 29
source/backend/plugin/CarlaPluginBridge.cpp View File

@@ -2690,35 +2690,6 @@ CarlaPlugin* CarlaPlugin::newBridge(const Initializer& init, BinaryType btype, P
return nullptr;
}

plugin->reload();

bool canRun = true;

if (init.engine->getProccessMode() == ENGINE_PROCESS_MODE_CONTINUOUS_RACK)
{
if (! plugin->canRunInRack())
{
init.engine->setLastError("Carla's rack mode can only work with Stereo Bridged plugins, sorry!");
canRun = false;
}
else if (plugin->getCVInCount() > 0 || plugin->getCVInCount() > 0)
{
init.engine->setLastError("Carla's rack mode cannot work with plugins that have CV ports, sorry!");
canRun = false;
}
}
else if (init.engine->getProccessMode() == ENGINE_PROCESS_MODE_PATCHBAY && (plugin->getCVInCount() > 0 || plugin->getCVInCount() > 0))
{
init.engine->setLastError("CV ports in patchbay mode is still TODO");
canRun = false;
}

if (! canRun)
{
delete plugin;
return nullptr;
}

return plugin;
}



+ 0
- 29
source/backend/plugin/CarlaPluginDSSI.cpp View File

@@ -2815,35 +2815,6 @@ CarlaPlugin* CarlaPlugin::newDSSI(const Initializer& init)
return nullptr;
}

plugin->reload();

bool canRun = true;

if (init.engine->getProccessMode() == ENGINE_PROCESS_MODE_CONTINUOUS_RACK)
{
if (! plugin->canRunInRack())
{
init.engine->setLastError("Carla's rack mode can only work with Mono or Stereo DSSI plugins, sorry!");
canRun = false;
}
else if (plugin->getCVInCount() > 0 || plugin->getCVInCount() > 0)
{
init.engine->setLastError("Carla's rack mode cannot work with plugins that have CV ports, sorry!");
canRun = false;
}
}
else if (init.engine->getProccessMode() == ENGINE_PROCESS_MODE_PATCHBAY && (plugin->getCVInCount() > 0 || plugin->getCVInCount() > 0))
{
init.engine->setLastError("CV ports in patchbay mode is still TODO");
canRun = false;
}

if (! canRun)
{
delete plugin;
return nullptr;
}

return plugin;
}



+ 0
- 2
source/backend/plugin/CarlaPluginFluidSynth.cpp View File

@@ -1697,8 +1697,6 @@ CarlaPlugin* CarlaPlugin::newFluidSynth(const Initializer& init, const bool use1
return nullptr;
}

plugin->reload();

return plugin;
#else
init.engine->setLastError("fluidsynth support not available");


+ 0
- 9
source/backend/plugin/CarlaPluginJuce.cpp View File

@@ -1274,15 +1274,6 @@ CarlaPlugin* CarlaPlugin::newJuce(const Initializer& init, const char* const for
return nullptr;
}

plugin->reload();

if (init.engine->getProccessMode() == ENGINE_PROCESS_MODE_CONTINUOUS_RACK && ! plugin->canRunInRack())
{
init.engine->setLastError("Carla's rack mode can only work with Stereo VST3 plugins, sorry!");
delete plugin;
return nullptr;
}

return plugin;
#else
init.engine->setLastError("Juce plugin not available");


+ 0
- 19
source/backend/plugin/CarlaPluginLADSPA.cpp View File

@@ -1842,25 +1842,6 @@ CarlaPlugin* CarlaPlugin::newLADSPA(const Initializer& init, const LADSPA_RDF_De
return nullptr;
}

plugin->reload();

bool canRun = true;

if (init.engine->getProccessMode() == ENGINE_PROCESS_MODE_CONTINUOUS_RACK)
{
if (! plugin->canRunInRack())
{
init.engine->setLastError("Carla's rack mode can only work with Mono or Stereo LADSPA plugins, sorry!");
canRun = false;
}
}

if (! canRun)
{
delete plugin;
return nullptr;
}

return plugin;
}



+ 0
- 29
source/backend/plugin/CarlaPluginLV2.cpp View File

@@ -6181,35 +6181,6 @@ CarlaPlugin* CarlaPlugin::newLV2(const Initializer& init)
return nullptr;
}

plugin->reload();

bool canRun = true;

if (init.engine->getProccessMode() == ENGINE_PROCESS_MODE_CONTINUOUS_RACK)
{
if (! plugin->canRunInRack())
{
init.engine->setLastError("Carla's rack mode can only work with Mono or Stereo LV2 plugins, sorry!");
canRun = false;
}
else if (plugin->getCVInCount() > 0 || plugin->getCVInCount() > 0)
{
init.engine->setLastError("Carla's rack mode cannot work with plugins that have CV ports, sorry!");
canRun = false;
}
}
else if (init.engine->getProccessMode() == ENGINE_PROCESS_MODE_PATCHBAY && (plugin->getCVInCount() > 0 || plugin->getCVInCount() > 0))
{
init.engine->setLastError("CV ports in patchbay mode is still TODO");
canRun = false;
}

if (! canRun)
{
delete plugin;
return nullptr;
}

return plugin;
}



+ 0
- 2
source/backend/plugin/CarlaPluginLinuxSampler.cpp View File

@@ -1431,8 +1431,6 @@ CarlaPlugin* CarlaPlugin::newLinuxSampler(const Initializer& init, const char* c
return nullptr;
}

plugin->reload();

return plugin;
#else
init.engine->setLastError("linuxsampler support not available");


+ 0
- 29
source/backend/plugin/CarlaPluginNative.cpp View File

@@ -2475,35 +2475,6 @@ CarlaPlugin* CarlaPlugin::newNative(const Initializer& init)
return nullptr;
}

plugin->reload();

bool canRun = true;

if (init.engine->getProccessMode() == ENGINE_PROCESS_MODE_CONTINUOUS_RACK)
{
if (! plugin->canRunInRack())
{
init.engine->setLastError("Carla's rack mode can only work with Mono or Stereo Internal plugins, sorry!");
canRun = false;
}
else if (plugin->getCVInCount() > 0 || plugin->getCVInCount() > 0)
{
init.engine->setLastError("Carla's rack mode cannot work with plugins that have CV ports, sorry!");
canRun = false;
}
}
else if (init.engine->getProccessMode() == ENGINE_PROCESS_MODE_PATCHBAY && (plugin->getCVInCount() > 0 || plugin->getCVInCount() > 0))
{
init.engine->setLastError("CV ports in patchbay mode is still TODO");
canRun = false;
}

if (! canRun)
{
delete plugin;
return nullptr;
}

return plugin;
}



+ 0
- 9
source/backend/plugin/CarlaPluginVST2.cpp View File

@@ -2423,15 +2423,6 @@ CarlaPlugin* CarlaPlugin::newVST2(const Initializer& init)
return nullptr;
}

plugin->reload();

if (init.engine->getProccessMode() == ENGINE_PROCESS_MODE_CONTINUOUS_RACK && ! plugin->canRunInRack())
{
init.engine->setLastError("Carla's rack mode can only work with Stereo VST plugins, sorry!");
delete plugin;
return nullptr;
}

return plugin;
#endif
}


Loading…
Cancel
Save