Browse Source

Define PLUGIN_CLAP and add stub files

Signed-off-by: falkTX <falktx@falktx.com>
pull/1689/head
falkTX 2 years ago
parent
commit
679e507f0a
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
9 changed files with 31 additions and 7 deletions
  1. +6
    -1
      source/backend/CarlaBackend.h
  2. +1
    -0
      source/backend/CarlaPlugin.hpp
  3. +6
    -1
      source/backend/engine/CarlaEngine.cpp
  4. +1
    -0
      source/backend/plugin/Makefile
  5. +2
    -0
      source/bridges-plugin/Makefile
  6. +3
    -0
      source/frontend/carla_backend.py
  7. +5
    -5
      source/frontend/carla_utils.py
  8. +6
    -0
      source/utils/CarlaBackendUtils.hpp
  9. +1
    -0
      source/utils/CarlaStateUtils.cpp

+ 6
- 1
source/backend/CarlaBackend.h View File

@@ -676,7 +676,12 @@ typedef enum {
/*! /*!
* JSFX plugin. * JSFX plugin.
*/ */
PLUGIN_JSFX = 13
PLUGIN_JSFX = 13,

/*!
* CLAP plugin.
*/
PLUGIN_CLAP = 14


} PluginType; } PluginType;




+ 1
- 0
source/backend/CarlaPlugin.hpp View File

@@ -979,6 +979,7 @@ public:
static CarlaPluginPtr newVST3(const Initializer& init); static CarlaPluginPtr newVST3(const Initializer& init);
static CarlaPluginPtr newAU(const Initializer& init); static CarlaPluginPtr newAU(const Initializer& init);
static CarlaPluginPtr newJSFX(const Initializer& init); static CarlaPluginPtr newJSFX(const Initializer& init);
static CarlaPluginPtr newCLAP(const Initializer& init);


static CarlaPluginPtr newJuce(const Initializer& init, const char* format); static CarlaPluginPtr newJuce(const Initializer& init, const char* format);
static CarlaPluginPtr newFluidSynth(const Initializer& init, PluginType ptype, bool use16Outs); static CarlaPluginPtr newFluidSynth(const Initializer& init, PluginType ptype, bool use16Outs);


+ 6
- 1
source/backend/engine/CarlaEngine.cpp View File

@@ -799,6 +799,10 @@ bool CarlaEngine::addPlugin(const BinaryType btype,
plugin = CarlaPlugin::newJSFX(initializer); plugin = CarlaPlugin::newJSFX(initializer);
break; break;


case PLUGIN_CLAP:
plugin = CarlaPlugin::newCLAP(initializer);
break;

case PLUGIN_JACK: case PLUGIN_JACK:
# ifdef HAVE_JACK # ifdef HAVE_JACK
plugin = CarlaPlugin::newJackApp(initializer); plugin = CarlaPlugin::newJackApp(initializer);
@@ -812,8 +816,9 @@ bool CarlaEngine::addPlugin(const BinaryType btype,
case PLUGIN_GIG: case PLUGIN_GIG:
case PLUGIN_SF2: case PLUGIN_SF2:
case PLUGIN_SFZ: case PLUGIN_SFZ:
case PLUGIN_JSFX:
case PLUGIN_JACK: case PLUGIN_JACK:
case PLUGIN_JSFX:
case PLUGIN_CLAP:
setLastError("Plugin bridges cannot handle this binary"); setLastError("Plugin bridges cannot handle this binary");
break; break;
#endif #endif


+ 1
- 0
source/backend/plugin/Makefile View File

@@ -34,6 +34,7 @@ OBJS = \
$(OBJDIR)/CarlaPlugin.cpp.o \ $(OBJDIR)/CarlaPlugin.cpp.o \
$(OBJDIR)/CarlaPluginInternal.cpp.o \ $(OBJDIR)/CarlaPluginInternal.cpp.o \
$(OBJDIR)/CarlaPluginNative.cpp.o \ $(OBJDIR)/CarlaPluginNative.cpp.o \
$(OBJDIR)/CarlaPluginCLAP.cpp.o \
$(OBJDIR)/CarlaPluginLADSPADSSI.cpp.o \ $(OBJDIR)/CarlaPluginLADSPADSSI.cpp.o \
$(OBJDIR)/CarlaPluginLV2.cpp.o \ $(OBJDIR)/CarlaPluginLV2.cpp.o \
$(OBJDIR)/CarlaPluginVST2.cpp.o \ $(OBJDIR)/CarlaPluginVST2.cpp.o \


+ 2
- 0
source/bridges-plugin/Makefile View File

@@ -217,6 +217,7 @@ OBJS_native = \
$(OBJDIR)/CarlaPluginInternal.cpp.o \ $(OBJDIR)/CarlaPluginInternal.cpp.o \
$(OBJDIR)/CarlaPluginJack.cpp.o \ $(OBJDIR)/CarlaPluginJack.cpp.o \
$(OBJDIR)/CarlaPluginNative.cpp.o \ $(OBJDIR)/CarlaPluginNative.cpp.o \
$(OBJDIR)/CarlaPluginCLAP.cpp.o \
$(OBJDIR)/CarlaPluginLADSPADSSI.cpp.o \ $(OBJDIR)/CarlaPluginLADSPADSSI.cpp.o \
$(OBJDIR)/CarlaPluginLV2.cpp.o \ $(OBJDIR)/CarlaPluginLV2.cpp.o \
$(OBJDIR)/CarlaPluginVST2.cpp.o \ $(OBJDIR)/CarlaPluginVST2.cpp.o \
@@ -244,6 +245,7 @@ OBJS_arch = \
$(OBJDIR)/CarlaPlugin.cpp.arch.o \ $(OBJDIR)/CarlaPlugin.cpp.arch.o \
$(OBJDIR)/CarlaPluginBridge.cpp.arch.o \ $(OBJDIR)/CarlaPluginBridge.cpp.arch.o \
$(OBJDIR)/CarlaPluginInternal.cpp.arch.o \ $(OBJDIR)/CarlaPluginInternal.cpp.arch.o \
$(OBJDIR)/CarlaPluginCLAP.cpp.arch.o \
$(OBJDIR)/CarlaPluginLADSPADSSI.cpp.arch.o \ $(OBJDIR)/CarlaPluginLADSPADSSI.cpp.arch.o \
$(OBJDIR)/CarlaPluginLV2.cpp.arch.o \ $(OBJDIR)/CarlaPluginLV2.cpp.arch.o \
$(OBJDIR)/CarlaPluginVST2.cpp.arch.o \ $(OBJDIR)/CarlaPluginVST2.cpp.arch.o \


+ 3
- 0
source/frontend/carla_backend.py View File

@@ -487,6 +487,9 @@ PLUGIN_JACK = 12
# JSFX plugin. # JSFX plugin.
PLUGIN_JSFX = 13 PLUGIN_JSFX = 13


# CLAP plugin.
PLUGIN_CLAP = 14

# --------------------------------------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------------------------------------
# Plugin Category # Plugin Category
# Plugin category, which describes the functionality of a plugin. # Plugin category, which describes the functionality of a plugin.


+ 5
- 5
source/frontend/carla_utils.py View File

@@ -43,13 +43,13 @@ from carla_backend import (
PLUGIN_VST2, PLUGIN_VST2,
PLUGIN_VST3, PLUGIN_VST3,
PLUGIN_AU, PLUGIN_AU,
PLUGIN_JSFX,
PLUGIN_DLS, PLUGIN_DLS,
PLUGIN_GIG, PLUGIN_GIG,
PLUGIN_SF2, PLUGIN_SF2,
PLUGIN_SFZ, PLUGIN_SFZ,
PLUGIN_JACK, PLUGIN_JACK,
PLUGIN_JSFX, PLUGIN_JSFX,
PLUGIN_CLAP,
PLUGIN_CATEGORY_NONE, PLUGIN_CATEGORY_NONE,
PLUGIN_CATEGORY_SYNTH, PLUGIN_CATEGORY_SYNTH,
PLUGIN_CATEGORY_DELAY, PLUGIN_CATEGORY_DELAY,
@@ -86,8 +86,6 @@ def getPluginTypeAsString(ptype):
return "VST3" return "VST3"
if ptype == PLUGIN_AU: if ptype == PLUGIN_AU:
return "AU" return "AU"
if ptype == PLUGIN_JSFX:
return "JSFX"
if ptype == PLUGIN_DLS: if ptype == PLUGIN_DLS:
return "DLS" return "DLS"
if ptype == PLUGIN_GIG: if ptype == PLUGIN_GIG:
@@ -100,6 +98,8 @@ def getPluginTypeAsString(ptype):
return "JACK" return "JACK"
if ptype == PLUGIN_JSFX: if ptype == PLUGIN_JSFX:
return "JSFX" return "JSFX"
if ptype == PLUGIN_CLAP:
return "CLAP"


print("getPluginTypeAsString(%i) - invalid type" % ptype) print("getPluginTypeAsString(%i) - invalid type" % ptype)
return "Unknown" return "Unknown"
@@ -126,8 +126,6 @@ def getPluginTypeFromString(stype):
return PLUGIN_VST3 return PLUGIN_VST3
if stype in ("au", "audiounit"): if stype in ("au", "audiounit"):
return PLUGIN_AU return PLUGIN_AU
if stype == "jsfx":
return PLUGIN_JSFX
if stype == "dls": if stype == "dls":
return PLUGIN_DLS return PLUGIN_DLS
if stype == "gig": if stype == "gig":
@@ -140,6 +138,8 @@ def getPluginTypeFromString(stype):
return PLUGIN_JACK return PLUGIN_JACK
if stype == "jsfx": if stype == "jsfx":
return PLUGIN_JSFX return PLUGIN_JSFX
if stype == "clap":
return PLUGIN_CLAP


print("getPluginTypeFromString(\"%s\") - invalid string type" % stype) print("getPluginTypeFromString(\"%s\") - invalid string type" % stype)
return PLUGIN_NONE return PLUGIN_NONE


+ 6
- 0
source/utils/CarlaBackendUtils.hpp View File

@@ -129,6 +129,8 @@ const char* PluginType2Str(const PluginType type) noexcept
return "PLUGIN_JACK"; return "PLUGIN_JACK";
case PLUGIN_JSFX: case PLUGIN_JSFX:
return "PLUGIN_JSFX"; return "PLUGIN_JSFX";
case PLUGIN_CLAP:
return "PLUGIN_CLAP";
} }


carla_stderr("CarlaBackend::PluginType2Str(%i) - invalid type", type); carla_stderr("CarlaBackend::PluginType2Str(%i) - invalid type", type);
@@ -600,6 +602,8 @@ const char* getPluginTypeAsString(const PluginType type) noexcept
return "JACK"; return "JACK";
case PLUGIN_JSFX: case PLUGIN_JSFX:
return "JSFX"; return "JSFX";
case PLUGIN_CLAP:
return "CLAP";
} }


carla_stderr("CarlaBackend::getPluginTypeAsString(%i) - invalid type", type); carla_stderr("CarlaBackend::getPluginTypeAsString(%i) - invalid type", type);
@@ -647,6 +651,8 @@ PluginType getPluginTypeFromString(const char* const ctype) noexcept
return PLUGIN_JACK; return PLUGIN_JACK;
if (stype == "jsfx") if (stype == "jsfx")
return PLUGIN_JSFX; return PLUGIN_JSFX;
if (stype == "clap")
return PLUGIN_CLAP;


carla_stderr("CarlaBackend::getPluginTypeFromString(\"%s\") - invalid string type", ctype); carla_stderr("CarlaBackend::getPluginTypeFromString(\"%s\") - invalid string type", ctype);
return PLUGIN_NONE; return PLUGIN_NONE;


+ 1
- 0
source/utils/CarlaStateUtils.cpp View File

@@ -594,6 +594,7 @@ void CarlaStateSave::dumpToMemoryStream(MemoryOutputStream& content) const
infoXml << " <Label>" << xmlSafeString(label, true) << "</Label>\n"; infoXml << " <Label>" << xmlSafeString(label, true) << "</Label>\n";
break; break;
case PLUGIN_AU: case PLUGIN_AU:
case PLUGIN_CLAP:
infoXml << " <Identifier>" << xmlSafeString(label, true) << "</Identifier>\n"; infoXml << " <Identifier>" << xmlSafeString(label, true) << "</Identifier>\n";
break; break;
case PLUGIN_DLS: case PLUGIN_DLS:


Loading…
Cancel
Save