Browse Source

Add STATIC_PLUGIN_TARGET macro; Fix wrong memory reads on lv2 list

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.4.1
parent
commit
dc6fdacf68
7 changed files with 53 additions and 5 deletions
  1. +6
    -0
      Makefile
  2. +17
    -0
      source/Makefile.deps.mk
  3. +4
    -0
      source/Makefile.mk
  4. +2
    -0
      source/backend/Makefile
  5. +10
    -0
      source/backend/engine/CarlaEngine.cpp
  6. +12
    -4
      source/backend/utils/CachedPlugins.cpp
  7. +2
    -1
      source/jackbridge/Makefile

+ 6
- 0
Makefile View File

@@ -33,10 +33,16 @@ all: backend discovery bridges-plugin bridges-ui frontend interposer libjack plu
# ---------------------------------------------------------------------------------------------------------------------
# Binaries (native)

ifneq ($(STATIC_PLUGIN_TARGET),true)
ALL_LIBS += $(MODULEDIR)/carla_engine.a
endif
ALL_LIBS += $(MODULEDIR)/carla_engine_plugin.a
ALL_LIBS += $(MODULEDIR)/carla_plugin.a
ifneq ($(STATIC_PLUGIN_TARGET),true)
ALL_LIBS += $(MODULEDIR)/jackbridge.a
else
ALL_LIBS += $(MODULEDIR)/jackbridge.min.a
endif
ALL_LIBS += $(MODULEDIR)/native-plugins.a
ALL_LIBS += $(MODULEDIR)/rtmempool.a



+ 17
- 0
source/Makefile.deps.mk View File

@@ -516,6 +516,23 @@ endif # WIN32

# ---------------------------------------------------------------------------------------------------------------------

ifeq ($(STATIC_PLUGIN_TARGET),true)
HAVE_ALSA = false
HAVE_DGL = false
HAVE_HYLIA = false
HAVE_JACK = false
HAVE_LIBLO = false
HAVE_PYQT = false
HAVE_QT4 = false
HAVE_QT5 = false
HAVE_QT5PKG = false
HAVE_PULSEAUDIO = false
USING_JUCE_AUDIO_DEVICES = false
USING_RTAUDIO = false
endif

# ---------------------------------------------------------------------------------------------------------------------

AUDIO_DECODER_LIBS = $(FFMPEG_LIBS)
AUDIO_DECODER_LIBS += $(SNDFILE_LIBS)



+ 4
- 0
source/Makefile.mk View File

@@ -222,6 +222,10 @@ ifeq ($(USING_RTAUDIO),true)
BASE_FLAGS += -DUSING_RTAUDIO
endif

ifeq ($(STATIC_PLUGIN_TARGET),true)
BASE_FLAGS += -DSTATIC_PLUGIN_TARGET
endif

# ---------------------------------------------------------------------------------------------------------------------
# Set app extension



+ 2
- 0
source/backend/Makefile View File

@@ -13,8 +13,10 @@ OBJS_standalone = \
$(OBJDIR)/CarlaStandalone.cpp.o \
$(OBJDIR)/CarlaStandaloneNSM.cpp.o

ifneq ($(STATIC_PLUGIN_TARGET),true)
TARGETS = \
$(BINDIR)/libcarla_standalone2$(LIB_EXT)
endif

# ---------------------------------------------------------------------------------------------------------------------



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

@@ -95,8 +95,10 @@ uint CarlaEngine::getDriverCount()

uint count = 0;

#ifndef STATIC_PLUGIN_TARGET
if (jackbridge_is_ok())
count += 1;
#endif

#ifndef BUILD_BRIDGE
# ifdef USING_JUCE_AUDIO_DEVICES
@@ -115,10 +117,12 @@ const char* CarlaEngine::getDriverName(const uint index2)
carla_debug("CarlaEngine::getDriverName(%i)", index2);
using namespace EngineInit;

#ifndef STATIC_PLUGIN_TARGET
uint index = index2;

if (jackbridge_is_ok() && index-- == 0)
return "JACK";
#endif

#ifndef BUILD_BRIDGE
# ifdef USING_JUCE_AUDIO_DEVICES
@@ -147,6 +151,7 @@ const char* const* CarlaEngine::getDriverDeviceNames(const uint index2)
carla_debug("CarlaEngine::getDriverDeviceNames(%i)", index2);
using namespace EngineInit;

#ifndef STATIC_PLUGIN_TARGET
uint index = index2;

if (jackbridge_is_ok() && index-- == 0)
@@ -154,6 +159,7 @@ const char* const* CarlaEngine::getDriverDeviceNames(const uint index2)
static const char* ret[3] = { "Auto-Connect ON", "Auto-Connect OFF", nullptr };
return ret;
}
#endif

#ifndef BUILD_BRIDGE
# ifdef USING_JUCE_AUDIO_DEVICES
@@ -182,6 +188,7 @@ const EngineDriverDeviceInfo* CarlaEngine::getDriverDeviceInfo(const uint index2
carla_debug("CarlaEngine::getDriverDeviceInfo(%i, \"%s\")", index2, deviceName);
using namespace EngineInit;

#ifndef STATIC_PLUGIN_TARGET
uint index = index2;

if (jackbridge_is_ok() && index-- == 0)
@@ -192,6 +199,7 @@ const EngineDriverDeviceInfo* CarlaEngine::getDriverDeviceInfo(const uint index2
devInfo.sampleRates = nullptr;
return &devInfo;
}
#endif

#ifndef BUILD_BRIDGE
# ifdef USING_JUCE_AUDIO_DEVICES
@@ -220,12 +228,14 @@ bool CarlaEngine::showDriverDeviceControlPanel(const uint index2, const char* co
carla_debug("CarlaEngine::showDriverDeviceControlPanel(%i, \"%s\")", index2, deviceName);
using namespace EngineInit;

#ifndef STATIC_PLUGIN_TARGET
uint index = index2;

if (jackbridge_is_ok() && index-- == 0)
{
return false;
}
#endif

#ifndef BUILD_BRIDGE
# ifdef USING_JUCE_AUDIO_DEVICES


+ 12
- 4
source/backend/utils/CachedPlugins.cpp View File

@@ -178,15 +178,23 @@ static const CarlaCachedPluginInfo* get_cached_plugin_lv2(Lv2WorldClass& lv2Worl
lilv_node_free(nameNode);
}

if (const char* const author = lilvPlugin.get_author_name().as_string())
smaker = author;
if (LilvNode* const authorNode = lilv_plugin_get_author_name(lilvPlugin.me))
{
if (const char* const author = lilv_node_as_string(authorNode))
smaker = author;
lilv_node_free(authorNode);
}

Lilv::Nodes licenseNodes(lilvPlugin.get_value(lv2World.doap_license));

if (licenseNodes.size() > 0)
{
if (const char* const license = licenseNodes.get_first().as_string())
slicense = license;
if (LilvNode* const licenseNode = lilv_nodes_get_first(licenseNodes.me))
{
if (const char* const license = lilv_node_as_string(licenseNode))
slicense = license;
// lilv_node_free(licenseNode);
}
}

lilv_nodes_free(const_cast<LilvNodes*>(licenseNodes.me));


+ 2
- 1
source/jackbridge/Makefile View File

@@ -70,7 +70,8 @@ OBJS_win32e = $(OBJDIR)/JackBridgeExport.cpp.win32e.o

# ---------------------------------------------------------------------------------------------------------------------

all: $(MODULEDIR)/$(MODULENAME).a $(MODULEDIR)/$(MODULENAME).min.a
all: $(MODULEDIR)/$(MODULENAME).a
min: $(MODULEDIR)/$(MODULENAME).min.a

ifeq ($(WIN32),true)
posix32:


Loading…
Cancel
Save