Browse Source

Tweak makefiles; Fix full build and install

tags/1.9.4
falkTX 11 years ago
parent
commit
9963928f69
32 changed files with 443 additions and 347 deletions
  1. +16
    -9
      Makefile
  2. +4
    -4
      data/carla-standalone.pc
  3. +37
    -3
      source/Makefile.mk
  4. +1
    -13
      source/backend/Makefile.mk
  5. +5
    -7
      source/backend/engine/Makefile
  6. +5
    -5
      source/backend/plugin/BridgePlugin.cpp
  7. +23
    -33
      source/backend/plugin/CarlaPlugin.cpp
  8. +116
    -50
      source/backend/plugin/CarlaPluginThread.cpp
  9. +4
    -0
      source/backend/plugin/CarlaPluginThread.hpp
  10. +6
    -6
      source/backend/plugin/DssiPlugin.cpp
  11. +4
    -4
      source/backend/plugin/FluidSynthPlugin.cpp
  12. +2
    -2
      source/backend/plugin/LinuxSamplerPlugin.cpp
  13. +5
    -5
      source/backend/plugin/Lv2Plugin.cpp
  14. +7
    -11
      source/backend/plugin/Makefile
  15. +20
    -21
      source/backend/plugin/NativePlugin.cpp
  16. +4
    -4
      source/backend/plugin/VstPlugin.cpp
  17. +1
    -1
      source/backend/standalone/CarlaStandalone.cpp
  18. +52
    -70
      source/backend/standalone/Makefile
  19. +9
    -9
      source/bridges/Makefile
  20. +3
    -0
      source/carla
  21. +3
    -0
      source/carla-patchbay
  22. +3
    -0
      source/carla-rack
  23. +11
    -10
      source/carla_style.py
  24. +23
    -27
      source/discovery/Makefile
  25. +37
    -9
      source/modules/carla_native/Makefile
  26. +2
    -2
      source/modules/carla_native/_all.c
  27. +5
    -5
      source/modules/carla_native/audio-base.hpp
  28. +3
    -3
      source/modules/carla_native/audio-file.cpp
  29. +5
    -5
      source/modules/carla_native/zynaddsubfx-fx.cpp
  30. +3
    -3
      source/modules/carla_native/zynaddsubfx-synth.cpp
  31. +6
    -2
      source/modules/theme/Makefile
  32. +18
    -24
      source/plugin/Makefile

+ 16
- 9
Makefile View File

@@ -141,14 +141,6 @@ doxygen:

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

install-dev:
install -d $(DESTDIR)$(PREFIX)/include/carla/
install -d $(DESTDIR)$(PREFIX)/include/carla/includes/

install -m 644 source/backend/CarlaBackend.h $(DESTDIR)$(PREFIX)/include/carla/
install -m 644 source/backend/CarlaHost.h $(DESTDIR)$(PREFIX)/include/carla/
install -m 644 source/includes/CarlaDefines.h $(DESTDIR)$(PREFIX)/include/carla/includes/

install:
# Create directories
install -d $(DESTDIR)$(PREFIX)/bin/
@@ -157,6 +149,9 @@ install:
install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/nekofilter/
install -d $(DESTDIR)$(PREFIX)/lib/carla/resources/zynaddsubfx/
install -d $(DESTDIR)$(PREFIX)/lib/lv2/carla-native.lv2/
install -d $(DESTDIR)$(PREFIX)/lib/pkgconfig/
install -d $(DESTDIR)$(PREFIX)/include/carla/
install -d $(DESTDIR)$(PREFIX)/include/carla/includes/
install -d $(DESTDIR)$(PREFIX)/share/applications/
install -d $(DESTDIR)$(PREFIX)/share/carla/
install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/16x16/apps/
@@ -203,6 +198,9 @@ install:
# Install mime package
install -m 644 data/carla.xml $(DESTDIR)$(PREFIX)/share/mime/packages/

# Install pkgconfig file
install -m 644 data/carla-standalone.pc $(DESTDIR)$(PREFIX)/lib/pkgconfig/

# Install backend
install -m 644 \
source/backend/*.so \
@@ -230,12 +228,20 @@ install:
source/carla-rack \
$(DESTDIR)$(PREFIX)/share/carla/

# Install headers
install -m 644 source/backend/CarlaBackend.h $(DESTDIR)$(PREFIX)/include/carla/
install -m 644 source/backend/CarlaHost.h $(DESTDIR)$(PREFIX)/include/carla/
install -m 644 source/includes/CarlaDefines.h $(DESTDIR)$(PREFIX)/include/carla/includes/

# Install resources
install -m 644 source/modules/carla_native/resources/*-ui $(DESTDIR)$(PREFIX)/lib/carla/resources/
install -m 644 source/modules/carla_native/resources/*.py $(DESTDIR)$(PREFIX)/lib/carla/resources/
install -m 644 source/modules/carla_native/resources/nekofilter/*.png $(DESTDIR)$(PREFIX)/lib/carla/resources/nekofilter/
install -m 644 source/modules/carla_native/resources/zynaddsubfx/*.png $(DESTDIR)$(PREFIX)/lib/carla/resources/zynaddsubfx/

# Install theme
$(MAKE) STYLES_DIR=$(DESTDIR)$(PREFIX)/lib/carla/styles install-main -C source/modules/theme

# Adjust PREFIX value in script files
sed -i "s/X-PREFIX-X/$(SED_PREFIX)/" \
$(DESTDIR)$(PREFIX)/bin/carla \
@@ -244,7 +250,8 @@ install:
$(DESTDIR)$(PREFIX)/bin/carla-patchbay \
$(DESTDIR)$(PREFIX)/bin/carla-rack \
$(DESTDIR)$(PREFIX)/bin/carla-settings \
$(DESTDIR)$(PREFIX)/bin/carla-single
$(DESTDIR)$(PREFIX)/bin/carla-single \
$(DESTDIR)$(PREFIX)/lib/pkgconfig/carla-standalone.pc

# Set plugin resources
cd $(DESTDIR)$(PREFIX)/lib/lv2/carla-native.lv2/ && \


+ 4
- 4
data/carla-standalone.pc View File

@@ -1,10 +1,10 @@
prefix=X-PREFIX-X
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
libdir=${exec_prefix}/lib/carla
includedir=${prefix}/include/carla

Name: carla-standalone
Version: 1.9.1
Description: Carla Host Standalone
Libs: -L${libdir}
Cflags: -I${includedir}/carla -I${includedir}/carla/includes
Libs: -Wl,rpath=${libdir} -L${libdir} -lcarla_standalone2
Cflags: -I${includedir} -I${includedir}/includes

+ 37
- 3
source/Makefile.mk View File

@@ -149,7 +149,43 @@ HAVE_JUCE = true
endif

# --------------------------------------------------------------
# Set libs stuff
# Set base stuff

ifeq ($(HAVE_FFMPEG),true)
BASE_FLAGS += -DHAVE_FFMPEG
endif

ifeq ($(HAVE_JUCE),true)
BASE_FLAGS += -DHAVE_JUCE
endif

ifeq ($(HAVE_OPENGL),true)
BASE_FLAGS += -DHAVE_OPENGL
endif

# --------------------------------------------------------------
# Set libs stuff (part 1)

LIBLO_FLAGS = $(shell pkg-config --cflags liblo)
LIBLO_LIBS = $(shell pkg-config --libs liblo)

ifeq ($(HAVE_FLUIDSYNTH),true)
FLUIDSYNTH_FLAGS = $(shell pkg-config --cflags fluidsynth)
FLUIDSYNTH_LIBS = $(shell pkg-config --libs fluidsynth)
endif

ifeq ($(HAVE_LINUXSAMPLER),true)
LINUXSAMPLER_FLAGS = $(shell pkg-config --cflags linuxsampler)
LINUXSAMPLER_LIBS = $(shell pkg-config --libs linuxsampler)
ifeq ($(WIN32),true)
LINUXSAMPLER_LIBS += -lrpcrt4
endif
endif

RTMEMPOOL_LIBS = -lpthread

# --------------------------------------------------------------
# Set libs stuff (part 2)

RTAUDIO_FLAGS = -DHAVE_GETTIMEOFDAY -D__UNIX_JACK__

@@ -158,8 +194,6 @@ RTAUDIO_FLAGS += -D__RTAUDIO_DEBUG__
RTMIDI_FLAGS += -D__RTMIDI_DEBUG__
endif

RTMEMPOOL_LIBS = -lpthread

ifeq ($(HAIKU),true)
endif



+ 1
- 13
source/backend/Makefile.mk View File

@@ -9,23 +9,11 @@ include ../../Makefile.mk
# --------------------------------------------------------------

BUILD_CXX_FLAGS += -I. -I.. -I../../includes -I../../utils -isystem ../../modules
BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo)

BUILD_CXX_FLAGS += $(LIBLO_FLAGS)
BUILD_CXX_FLAGS += $(QTCORE_FLAGS)
BUILD_CXX_FLAGS += $(QTXML_FLAGS)

ifeq ($(HAVE_FFMPEG),true)
BUILD_CXX_FLAGS += -DHAVE_FFMPEG
endif

ifeq ($(HAVE_JUCE),true)
BUILD_CXX_FLAGS += -DHAVE_JUCE
endif

ifeq ($(HAVE_OPENGL),true)
BUILD_CXX_FLAGS += -DHAVE_OPENGL
endif

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

BUILD_CXX_FLAGS += -DWANT_NATIVE


+ 5
- 7
source/backend/engine/Makefile View File

@@ -8,11 +8,6 @@ include ../Makefile.mk

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

BUILD_CXX_FLAGS += $(RTAUDIO_FLAGS)
BUILD_CXX_FLAGS += $(RTMIDI_FLAGS)

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

OBJS = \
CarlaEngine.cpp.o \
CarlaEngineOsc.cpp.o \
@@ -35,8 +30,8 @@ HEADERS = \
../CarlaBackend.h ../CarlaEngine.hpp ../CarlaPlugin.hpp \
CarlaEngineInternal.hpp CarlaEngineOsc.hpp CarlaEngineThread.hpp

TARGETa = ../libcarla_engine.a
TARGETp = ../libcarla_engine_plugin.a
TARGETa = ../carla_engine.a
TARGETp = ../carla_engine_plugin.a

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

@@ -50,6 +45,9 @@ all: $(TARGETa) $(TARGETp)
%.cpp.exp.o: %.cpp $(HEADERS)
$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_EXPORT -c -o $@

CarlaEngineRtAudio.cpp.o: CarlaEngineRtAudio.cpp $(HEADERS)
$(CXX) $< $(BUILD_CXX_FLAGS) $(RTAUDIO_FLAGS) $(RTMIDI_FLAGS) -c -o $@

$(TARGETa): $(OBJSa)
$(RM) $@
$(AR) crs $@ $^


+ 5
- 5
source/backend/plugin/BridgePlugin.cpp View File

@@ -751,7 +751,7 @@ public:
// disable any output sound
for (i=0; i < pData->audioOut.count; ++i)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(outBuffer[i], frames);
#else
carla_zeroFloat(outBuffer[i], frames);
@@ -1061,7 +1061,7 @@ public:
{
for (i=0; i < pData->audioOut.count; ++i)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(outBuffer[i], frames);
#else
#endif
@@ -1075,7 +1075,7 @@ public:

for (i=0; i < fInfo.aIns; ++i)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::copy(fShmAudioPool.data + (i * frames), inBuffer[i], frames);
#else
#endif
@@ -1095,7 +1095,7 @@ public:

for (i=0; i < fInfo.aOuts; ++i)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::copy(outBuffer[i], fShmAudioPool.data + ((i + fInfo.aIns) * frames), frames);
#else
#endif
@@ -1132,7 +1132,7 @@ public:
if (isPair)
{
CARLA_ASSERT(i+1 < pData->audioOut.count);
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::copy(oldBufLeft, outBuffer[i], frames);
#else
#endif


+ 23
- 33
source/backend/plugin/CarlaPlugin.cpp View File

@@ -812,23 +812,23 @@ bool CarlaPlugin::saveStateToFile(const char* const filename)
CARLA_SAFE_ASSERT_RETURN(filename != nullptr && filename[0] != '\0', false);
carla_debug("CarlaPlugin::saveStateToFile(\"%s\")", filename);

#ifdef USE_JUCE
File file(filename);
QFile file(filename);

String content;
if (! file.open(QIODevice::WriteOnly | QIODevice::Text))
return false;

QString content;
fillXmlStringFromSaveState(content, getSaveState());

MemoryOutputStream out;
QTextStream out(&file);
out << "<?xml version='1.0' encoding='UTF-8'?>\n";
out << "<!DOCTYPE CARLA-PRESET>\n";
out << "<CARLA-PRESET VERSION='2.0'>\n";
out << content;
out << "</CARLA-PRESET>\n";

return file.replaceWithData(out.getData(), out.getDataSize());
#else
return false;
#endif
file.close();
return true;
}

bool CarlaPlugin::loadStateFromFile(const char* const filename)
@@ -836,38 +836,28 @@ bool CarlaPlugin::loadStateFromFile(const char* const filename)
CARLA_SAFE_ASSERT_RETURN(filename != nullptr && filename[0] != '\0', false);
carla_debug("CarlaPlugin::loadStateFromFile(\"%s\")", filename);

#ifdef USE_JUCE
File file(filename);
QFile file(filename);

XmlDocument xml(file);
if (! file.open(QIODevice::ReadOnly | QIODevice::Text))
return false;

if (XmlElement* const xmlCheck = xml.getDocumentElement(true))
{
if (xmlCheck->getTagName().equalsIgnoreCase("carla-preset"))
{
if (XmlElement* const xmlElem = xml.getDocumentElement(false))
{
pData->saveState.reset();
fillSaveStateFromXmlElement(pData->saveState, xmlElem);
loadSaveState(pData->saveState);
QDomDocument xml;
xml.setContent(file.readAll());
file.close();

delete xmlElem;
delete xmlCheck;
return true;
}
else
pData->engine->setLastError("Failed to parse file");
}
else
pData->engine->setLastError("Invalid Carla preset file");
QDomNode xmlNode(xml.documentElement());

delete xmlCheck;
if (xmlNode.toElement().tagName().compare("carla-preset", Qt::CaseInsensitive) == 0)
{
pData->engine->setLastError("Not a valid Carla preset file");
return false;
}
#endif

pData->engine->setLastError("Not a valid file");
return false;
pData->saveState.reset();
fillSaveStateFromXmlNode(pData->saveState, xmlNode);
loadSaveState(pData->saveState);

return true;
}

// -------------------------------------------------------------------


+ 116
- 50
source/backend/plugin/CarlaPluginThread.cpp View File

@@ -20,11 +20,7 @@
#include "CarlaPlugin.hpp"
#include "CarlaEngine.hpp"

#ifdef USE_JUCE
using juce::ChildProcess;
using juce::String;
using juce::StringArray;
#endif
#include <QtCore/QProcess>

CARLA_BACKEND_START_NAMESPACE

@@ -52,11 +48,21 @@ CarlaPluginThread::CarlaPluginThread(CarlaBackend::CarlaEngine* const engine, Ca
: CarlaThread("CarlaPluginThread"),
fEngine(engine),
fPlugin(plugin),
fMode(mode)
fMode(mode),
fProcess(nullptr)
{
carla_debug("CarlaPluginThread::CarlaPluginThread(%p, %p, %s)", engine, plugin, PluginThreadMode2str(mode));
}

CarlaPluginThread::~CarlaPluginThread()
{
carla_debug("CarlaPluginThread::~CarlaPluginThread()");

//setPriority(5);
if (fProcess != nullptr)
{
delete fProcess;
fProcess = nullptr;
}
}

void CarlaPluginThread::setMode(const CarlaPluginThread::Mode mode)
@@ -82,13 +88,35 @@ void CarlaPluginThread::run()
{
carla_debug("CarlaPluginThread::run()");

#ifdef USE_JUCE
ChildProcess process;
if (fProcess == nullptr)
{
fProcess = new QProcess(nullptr);
fProcess->setProcessChannelMode(QProcess::ForwardedChannels);
}
else if (fProcess->state() == QProcess::Running)
{
carla_stderr("CarlaPluginThread::run() - already running, giving up...");

switch (fMode)
{
case PLUGIN_THREAD_NULL:
break;

case PLUGIN_THREAD_DSSI_GUI:
case PLUGIN_THREAD_LV2_GUI:
case PLUGIN_THREAD_VST_GUI:
fEngine->callback(CarlaBackend::ENGINE_CALLBACK_UI_STATE_CHANGED, fPlugin->getId(), -1, 0, 0.0f, nullptr);
fProcess->terminate();
return;

case PLUGIN_THREAD_BRIDGE:
break;
}
}

StringArray arguments;
arguments.add((const char*)fBinary);
QString name(fPlugin->getName());
QStringList arguments;

String name(fPlugin->getName());
if (name.isEmpty())
name = "(none)";

@@ -98,37 +126,37 @@ void CarlaPluginThread::run()
break;

case PLUGIN_THREAD_DSSI_GUI:
/* osc-url */ arguments.add(String(fEngine->getOscServerPathUDP()) + "/" + String(fPlugin->getId()));
/* filename */ arguments.add(fPlugin->getFilename());
/* label */ arguments.add((const char*)fLabel);
/* ui-title */ arguments.add(name + " (GUI)");
/* osc-url */ arguments << QString("%1/%2").arg(fEngine->getOscServerPathUDP()).arg(fPlugin->getId());
/* filename */ arguments << fPlugin->getFilename();
/* label */ arguments << (const char*)fLabel;
/* ui-title */ arguments << QString("%1 (GUI)").arg(fPlugin->getName());
break;

case PLUGIN_THREAD_LV2_GUI:
/* osc-url */ arguments.add(String(fEngine->getOscServerPathTCP()) + "/" + String(fPlugin->getId()));
/* URI */ arguments.add((const char*)fLabel);
/* ui-URI */ arguments.add((const char*)fExtra1);
/* ui-title */ arguments.add(name + " (GUI)");
/* osc-url */ arguments << QString("%1/%2").arg(fEngine->getOscServerPathTCP()).arg(fPlugin->getId());
/* URI */ arguments << (const char*)fLabel;
/* ui-URI */ arguments << (const char*)fExtra1;
/* ui-title */ arguments << QString("%1 (GUI)").arg(fPlugin->getName());
break;

case PLUGIN_THREAD_VST_GUI:
/* osc-url */ arguments.add(String(fEngine->getOscServerPathTCP()) + "/" + String(fPlugin->getId()));
/* filename */ arguments.add(fPlugin->getFilename());
/* ui-title */ arguments.add(name + " (GUI)");
/* osc-url */ arguments << QString("%1/%2").arg(fEngine->getOscServerPathTCP()).arg(fPlugin->getId());
/* filename */ arguments << fPlugin->getFilename();
/* ui-title */ arguments << QString("%1 (GUI)").arg(fPlugin->getName());
break;

case PLUGIN_THREAD_BRIDGE:
/* osc-url */ arguments.add(String(fEngine->getOscServerPathTCP()) + "/" + String(fPlugin->getId()));
/* stype */ arguments.add((const char*)fExtra1);
/* filename */ arguments.add(fPlugin->getFilename());
/* name */ arguments.add(name);
/* label */ arguments.add((const char*)fLabel);
/* SHM ids */ arguments.add((const char*)fExtra2);
/* osc-url */ arguments << QString("%1/%2").arg(fEngine->getOscServerPathTCP()).arg(fPlugin->getId());
/* stype */ arguments << (const char*)fExtra1;
/* filename */ arguments << fPlugin->getFilename();
/* name */ arguments << name;
/* label */ arguments << (const char*)fLabel;
/* SHM ids */ arguments << (const char*)fExtra2;
break;
}

if (! process.start(arguments))
return;
fProcess->start((const char*)fBinary, arguments);
fProcess->waitForStarted();

switch (fMode)
{
@@ -140,50 +168,88 @@ void CarlaPluginThread::run()
case PLUGIN_THREAD_VST_GUI:
if (fPlugin->waitForOscGuiShow())
{
while (process.isRunning() && ! threadShouldExit())
sleep(1000);
//fProcess->waitForFinished(-1);

while (fProcess->state() != QProcess::NotRunning && ! shouldExit())
carla_sleep(1);

// we only get here is UI was closed or thread asked to exit
// we only get here if UI was closed or thread asked to exit

if (threadShouldExit())
if (fProcess->state() != QProcess::NotRunning && shouldExit())
{
if (process.isRunning())
process.kill();
fProcess->waitForFinished(fEngine->getOptions().uiBridgesTimeout);

if (fProcess->state() == QProcess::Running)
{
carla_stdout("CarlaPluginThread::run() - UI refused to close, force kill now");
fProcess->kill();
}
else
{
carla_stdout("CarlaPluginThread::run() - UI auto-closed successfully");
}

fEngine->callback(CarlaBackend::ENGINE_CALLBACK_UI_STATE_CHANGED, fPlugin->getId(), 0, 0, 0.0f, nullptr);
}
else if (fProcess->exitCode() != 0 || fProcess->exitStatus() == QProcess::CrashExit)
{
carla_stderr("CarlaPluginThread::run() - UI crashed while running");
fEngine->callback(CarlaBackend::ENGINE_CALLBACK_UI_STATE_CHANGED, fPlugin->getId(), -1, 0, 0.0f, nullptr);
}
else
{
fEngine->callback(CarlaBackend::CALLBACK_SHOW_GUI, fPlugin->getId(), 0, 0, 0.0f, nullptr);
carla_stdout("CarlaPluginThread::run() - UI closed cleanly");
fEngine->callback(CarlaBackend::ENGINE_CALLBACK_UI_STATE_CHANGED, fPlugin->getId(), 0, 0, 0.0f, nullptr);
}
}
else
{
if (process.isRunning() && ! process.waitForProcessToFinish(500))
{
process.kill();
fProcess->close();
CARLA_ASSERT(fProcess->state() == QProcess::NotRunning);

fEngine->callback(CarlaBackend::CALLBACK_SHOW_GUI, fPlugin->getId(), -1, 0, 0.0f, nullptr);
if (fProcess->exitCode() != 0 || fProcess->exitStatus() == QProcess::CrashExit)
{
carla_stderr("CarlaPluginThread::run() - GUI crashed while opening");
fEngine->callback(CarlaBackend::ENGINE_CALLBACK_UI_STATE_CHANGED, fPlugin->getId(), -1, 0, 0.0f, nullptr);
}
else
{
fEngine->callback(CarlaBackend::CALLBACK_SHOW_GUI, fPlugin->getId(), 0, 0, 0.0f, nullptr);
carla_stderr("CarlaPluginThread::run() - GUI timeout");
carla_debug("CarlaPluginThread::run() - GUI timeout");
fEngine->callback(CarlaBackend::ENGINE_CALLBACK_UI_STATE_CHANGED, fPlugin->getId(), 0, 0, 0.0f, nullptr);
}
}
break;

case PLUGIN_THREAD_BRIDGE:
while (process.isRunning() && ! threadShouldExit())
sleep(1000);
//fProcess->waitForFinished(-1);

if (threadShouldExit())
while (fProcess->state() != QProcess::NotRunning && ! shouldExit())
carla_sleep(1);

// we only get here if bridge crashed or thread asked to exit

if (shouldExit())
{
if (process.isRunning())
process.kill();
fProcess->waitForFinished(500);

if (fProcess->state() == QProcess::Running)
fProcess->close();
}
else
{
// forced quit, may have crashed
if (fProcess->exitCode() != 0 || fProcess->exitStatus() == QProcess::CrashExit)
{
carla_stderr("CarlaPluginThread::run() - bridge crashed");

CarlaString errorString("Plugin '" + CarlaString(fPlugin->getName()) + "' has crashed!\n"
"Saving now will lose its current settings.\n"
"Please remove this plugin, and not rely on it from this point.");
fEngine->callback(CarlaBackend::ENGINE_CALLBACK_ERROR, fPlugin->getId(), 0, 0, 0.0f, (const char*)errorString);
}
}
break;
}
#endif
}

CARLA_BACKEND_END_NAMESPACE

+ 4
- 0
source/backend/plugin/CarlaPluginThread.hpp View File

@@ -21,6 +21,8 @@
#include "CarlaBackend.h"
#include "CarlaThread.hpp"

class QProcess;

CARLA_BACKEND_START_NAMESPACE

#if 0
@@ -41,6 +43,7 @@ public:
};

CarlaPluginThread(CarlaEngine* const engine, CarlaPlugin* const plugin, const Mode mode = PLUGIN_THREAD_NULL);
~CarlaPluginThread() override;

void setMode(const CarlaPluginThread::Mode mode);
void setOscData(const char* const binary, const char* const label, const char* const extra1="", const char* const extra2="");
@@ -57,6 +60,7 @@ private:
CarlaString fLabel;
CarlaString fExtra1;
CarlaString fExtra2;
QProcess* fProcess;

CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaPluginThread)
};


+ 6
- 6
source/backend/plugin/DssiPlugin.cpp View File

@@ -483,7 +483,7 @@ public:
pData->param.createNew(params);

fParamBuffers = new float[params];
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(fParamBuffers, params);
#else
#endif
@@ -955,7 +955,7 @@ public:
// disable any output sound
for (uint32_t i=0; i < pData->audioOut.count; ++i)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(outBuffer[i], frames);
#else
#endif
@@ -1004,7 +1004,7 @@ public:
{
for (uint32_t i=0; i < pData->audioIn.count; ++i)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(pData->latencyBuffers[i], pData->latency);
#else
#endif
@@ -1460,7 +1460,7 @@ public:

for (uint32_t i=0; i < pData->audioIn.count; ++i)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::copy(fAudioInBuffers[i], inBuffer[i]+timeOffset, frames);
#else
#endif
@@ -1468,7 +1468,7 @@ public:

for (uint32_t i=0; i < pData->audioOut.count; ++i)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(fAudioOutBuffers[i], frames);
#else
#endif
@@ -1537,7 +1537,7 @@ public:
if (isPair)
{
CARLA_ASSERT(i+1 < pData->audioOut.count);
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::copy(oldBufLeft, fAudioOutBuffers[i], frames);
#else
#endif


+ 4
- 4
source/backend/plugin/FluidSynthPlugin.cpp View File

@@ -46,7 +46,7 @@ public:
{
carla_debug("FluidSynthPlugin::FluidSynthPlugin(%p, %i, %s)", engine, id, bool2str(use16Outs));

#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(fParamBuffers, FluidSynthParametersMax);
#else
#endif
@@ -993,7 +993,7 @@ public:
// disable any output sound
for (i=0; i < pData->audioOut.count; ++i)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(outBuffer[i], frames);
#else
#endif
@@ -1371,7 +1371,7 @@ public:
{
for (i=0; i < pData->audioOut.count; ++i)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(fAudio16Buffers[i], frames);
#else
#endif
@@ -1400,7 +1400,7 @@ public:
{
if (i % 2 == 0)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::copy(oldBufLeft, outBuffer[i]+timeOffset, frames);
#else
#endif


+ 2
- 2
source/backend/plugin/LinuxSamplerPlugin.cpp View File

@@ -512,7 +512,7 @@ public:
// disable any output sound
for (i=0; i < pData->audioOut.count; ++i)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(outBuffer[i], frames);
#else
#endif
@@ -885,7 +885,7 @@ public:
{
if (i % 2 == 0)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::copy(oldBufLeft, outBuffer[i], frames);
#else
#endif


+ 5
- 5
source/backend/plugin/Lv2Plugin.cpp View File

@@ -1433,7 +1433,7 @@ public:
pData->param.createNew(params+cvIns+cvOuts);

fParamBuffers = new float[params+cvIns+cvOuts];
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(fParamBuffers, params+cvIns+cvOuts);
#else
#endif
@@ -2329,7 +2329,7 @@ public:
// disable any output sound
for (i=0; i < pData->audioOut.count; ++i)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(outBuffer[i], frames);
#else
#endif
@@ -3142,7 +3142,7 @@ public:

for (i=0; i < pData->audioIn.count; ++i)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::copy(fAudioInBuffers[i], inBuffer[i]+timeOffset, frames);
#else
#endif
@@ -3150,7 +3150,7 @@ public:

for (i=0; i < pData->audioOut.count; ++i)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(fAudioOutBuffers[i], frames);
#else
#endif
@@ -3236,7 +3236,7 @@ public:
if (isPair)
{
CARLA_ASSERT(i+1 < pData->audioOut.count);
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::copy(oldBufLeft, fAudioOutBuffers[i], frames);
#else
#endif


+ 7
- 11
source/backend/plugin/Makefile View File

@@ -8,16 +8,6 @@ include ../Makefile.mk

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

# ifeq ($(HAVE_FLUIDSYNTH),true)
# BUILD_CXX_FLAGS += $(shell pkg-config --cflags fluidsynth)
# endif
#
# ifeq ($(HAVE_LINUXSAMPLER),true)
# BUILD_CXX_FLAGS += $(shell pkg-config --cflags linuxsampler)
# endif

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

OBJS = \
CarlaPlugin.cpp.o \
CarlaPluginThread.cpp.o \
@@ -36,7 +26,7 @@ HEADERS = \
../CarlaBackend.h ../CarlaEngine.hpp ../CarlaPlugin.hpp \
CarlaPluginInternal.hpp CarlaPluginThread.hpp

TARGET = ../libcarla_plugin.a
TARGET = ../carla_plugin.a

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

@@ -47,6 +37,12 @@ all: $(TARGET)
%.cpp.o: %.cpp $(HEADERS)
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@

FluidSynthPlugin.cpp.o: FluidSynthPlugin.cpp $(HEADERS)
$(CXX) $< $(BUILD_CXX_FLAGS) $(FLUIDSYNTH_FLAGS) -c -o $@

LinuxSamplerPlugin.cpp.o: LinuxSamplerPlugin.cpp $(HEADERS)
$(CXX) $< $(BUILD_CXX_FLAGS) $(LINUXSAMPLER_FLAGS) -c -o $@

$(TARGET): $(OBJS)
$(RM) $@
$(AR) crs $@ $^


+ 20
- 21
source/backend/plugin/NativePlugin.cpp View File

@@ -22,6 +22,8 @@
#include "CarlaNative.h"
#include "CarlaHost.h"

#include <QtCore/QStringList>

extern const char* carla_file_callback(FileCallbackOpcode action, bool isDir, const char* title, const char* filter);

CARLA_BACKEND_START_NAMESPACE
@@ -43,19 +45,16 @@ struct NativePluginMidiData {
~NativePluginMidiData()
{
CARLA_ASSERT_INT(count == 0, count);
CARLA_ASSERT(ports == nullptr);
CARLA_ASSERT(indexes == nullptr);
CARLA_ASSERT(ports == nullptr);
}

void createNew(const uint32_t newCount)
{
CARLA_ASSERT_INT(count == 0, count);
CARLA_ASSERT(ports == nullptr);
CARLA_ASSERT(indexes == nullptr);
CARLA_ASSERT_INT(newCount > 0, newCount);

if (ports != nullptr || indexes != nullptr || newCount == 0)
return;
CARLA_SAFE_ASSERT_INT(count == 0, count);
CARLA_SAFE_ASSERT_RETURN(indexes == nullptr,);
CARLA_SAFE_ASSERT_RETURN(ports == nullptr,);
CARLA_SAFE_ASSERT_RETURN(newCount > 0,);

ports = new CarlaEngineEventPort*[newCount];
indexes = new uint32_t[newCount];
@@ -127,7 +126,7 @@ public:
carla_zeroStruct<NativeTimeInfo>(fTimeInfo);

fHost.handle = this;
fHost.resourceDir = carla_strdup((const char*)engine->getOptions().resourceDir);
fHost.resourceDir = carla_strdup(engine->getOptions().resourceDir);
fHost.uiName = nullptr;

fHost.get_buffer_size = carla_host_get_buffer_size;
@@ -251,6 +250,7 @@ public:
unsigned int getOptionsAvailable() const override
{
CARLA_SAFE_ASSERT_RETURN(fDescriptor != nullptr, 0x0);
CARLA_SAFE_ASSERT_RETURN(fHandle != nullptr, 0);

const bool hasMidiProgs(fDescriptor->get_midi_program_count != nullptr && fDescriptor->get_midi_program_count(fHandle) > 0);

@@ -546,12 +546,11 @@ public:
}
else if (std::strcmp(key, "midiPrograms") == 0 && fDescriptor->set_midi_program != nullptr)
{
#if 0 // TODO
QStringList midiProgramList(QString(value).split(":", QString::SkipEmptyParts));

if (midiProgramList.count() == MAX_MIDI_CHANNELS)
{
uint i = 0;
uint8_t channel = 0;
foreach (const QString& midiProg, midiProgramList)
{
bool ok;
@@ -562,24 +561,23 @@ public:
const uint32_t bank = pData->midiprog.data[index].bank;
const uint32_t program = pData->midiprog.data[index].program;

fDescriptor->set_midi_program(fHandle, i, bank, program);
fDescriptor->set_midi_program(fHandle, channel, bank, program);

if (fHandle2 != nullptr)
fDescriptor->set_midi_program(fHandle2, i, bank, program);
fDescriptor->set_midi_program(fHandle2, channel, bank, program);

fCurMidiProgs[i] = index;
fCurMidiProgs[channel] = index;

if (pData->ctrlChannel == static_cast<int32_t>(i))
if (pData->ctrlChannel == static_cast<int32_t>(channel))
{
pData->midiprog.current = index;
pData->engine->callback(ENGINE_CALLBACK_MIDI_PROGRAM_CHANGED, pData->id, index, 0, 0.0f, nullptr);
}
}

++i;
++channel;
}
}
#endif
}
else
{
@@ -959,11 +957,12 @@ public:

if (paramInfo->hints & ::PARAMETER_IS_OUTPUT)
{
pData->param.data[j].type = PARAMETER_OUTPUT;
needsCtrlOut = true;
}
else
{
//pData->param.data[j].hints |= PARAMETER_IS_INPUT;
pData->param.data[j].type = PARAMETER_INPUT;
needsCtrlIn = true;
}

@@ -1685,7 +1684,7 @@ public:

for (i=0; i < pData->audioIn.count; ++i)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::copy(fAudioInBuffers[i], inBuffer[i]+timeOffset, frames);
#else
#endif
@@ -1693,7 +1692,7 @@ public:

for (i=0; i < pData->audioOut.count; ++i)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(fAudioOutBuffers[i], frames);
#else
#endif
@@ -1755,7 +1754,7 @@ public:
if (isPair)
{
CARLA_ASSERT(i+1 < pData->audioOut.count);
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::copy(oldBufLeft, fAudioOutBuffers[i], frames);
#else
#endif


+ 4
- 4
source/backend/plugin/VstPlugin.cpp View File

@@ -988,7 +988,7 @@ public:
// disable any output sound
for (i=0; i < pData->audioOut.count; ++i)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(outBuffer[i], frames);
#else
#endif
@@ -1039,7 +1039,7 @@ public:
{
for (i=0; i < pData->audioIn.count; ++i)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(pData->latencyBuffers[i], pData->latency);
#else
#endif
@@ -1519,7 +1519,7 @@ public:
{
for (i=0; i < pData->audioOut.count; ++i)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(vstOutBuffer[i], frames);
#else
#endif
@@ -1568,7 +1568,7 @@ public:
if (isPair)
{
CARLA_ASSERT(i+1 < pData->audioOut.count);
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::copy(oldBufLeft, outBuffer[i]+timeOffset, frames);
#else
#endif


+ 1
- 1
source/backend/standalone/CarlaStandalone.cpp View File

@@ -213,7 +213,7 @@ const char* carla_get_complete_license_text()

#ifdef WANT_NATIVE
// Internal plugins
# ifdef WANT_OPENGL
# ifdef HAVE_OPENGL
text3 += "<li>DISTRHO Mini-Series plugin code, based on LOSER-dev suite by Michael Gruhn</li>";
# endif
text3 += "<li>NekoFilter plugin code, based on lv2fil by Nedko Arnaudov and Fons Adriaensen</li>";


+ 52
- 70
source/backend/standalone/Makefile View File

@@ -9,103 +9,85 @@ include ../Makefile.mk
# --------------------------------------------------------------
# Common

LINK_FLAGS += $(shell pkg-config --libs liblo)
STATIC_LIBS = ../carla_engine.a
STATIC_LIBS += ../carla_plugin.a
STATIC_LIBS += ../../modules/rtmempool.a

LINK_FLAGS += $(QTCORE_LIBS)
LINK_FLAGS += $(QTXML_LIBS)
LINK_FLAGS += $(RTMEMPOOL_LIBS)
LINK_FLAGS += $(LIBLO_LIBS)
LINK_FLAGS += $(QTCORE_LIBS)
LINK_FLAGS += $(QTXML_LIBS)
LINK_FLAGS += $(RTMEMPOOL_LIBS)

# --------------------------------------------------------------
# Engine

LINK_FLAGS += $(RTAUDIO_LIBS)
LINK_FLAGS += $(RTMIDI_LIBS)
LINK_FLAGS += $(JACKBRIDGE_LIBS)
STATIC_LIBS += ../../modules/jackbridge.a
STATIC_LIBS += ../../modules/rtaudio.a
STATIC_LIBS += ../../modules/rtmidi.a

# --------------------------------------------------------------
# Plugin

# ifeq ($(CARLA_PLUGIN_SUPPORT),true)
# LINK_FLAGS += $(LILV_LIBS)
# endif
#
# ifeq ($(HAVE_FLUIDSYNTH),true)
# LINK_FLAGS += $(shell pkg-config --libs fluidsynth)
# endif
#
# ifeq ($(HAVE_LINUXSAMPLER),true)
# LINK_FLAGS += $(shell pkg-config --libs linuxsampler)
# ifeq ($(WIN32),true)
# LINK_FLAGS += lrpcrt4
# endif
# endif
LINK_FLAGS += $(JACKBRIDGE_LIBS)
LINK_FLAGS += $(RTAUDIO_LIBS)
LINK_FLAGS += $(RTMIDI_LIBS)

# --------------------------------------------------------------
# Coomon
# Plugin

ifeq ($(HAVE_FFMPEG),true)
LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil)
ifeq ($(CARLA_PLUGIN_SUPPORT),true)
STATIC_LIBS += ../../modules/lilv.a
LINK_FLAGS += $(LILV_LIBS)
endif

ifeq ($(HAVE_JUCE),true)
LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
LINK_FLAGS += $(JUCE_AUDIO_DEVICES_LIBS)
LINK_FLAGS += $(JUCE_CORE_LIBS)
# LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
LINK_FLAGS += $(JUCE_EVENTS_LIBS)
# LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
# LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
endif

ifeq ($(HAVE_OPENGL),true)
LINK_FLAGS += $(DGL_LIBS)
ifeq ($(CARLA_SAMPLERS_SUPPORT),true)
LINK_FLAGS += $(FLUIDSYNTH_LIBS)
LINK_FLAGS += $(LINUXSAMPLER_LIBS)
endif

# --------------------------------------------------------------
# Native

STATIC_LIBS += ../../modules/carla_native.a

ifeq ($(HAVE_AF_DEPS),true)
LINK_FLAGS += $(shell pkg-config --libs sndfile)
LINK_FLAGS += $(shell pkg-config --libs sndfile)
ifeq ($(HAVE_FFMPEG),true)
LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil)
endif
endif

ifeq ($(HAVE_MF_DEPS),true)
LINK_FLAGS += $(shell pkg-config --libs smf)
LINK_FLAGS += $(shell pkg-config --libs smf)
endif

ifeq ($(HAVE_ZYN_DEPS),true)
LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml zlib)
LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml zlib)
ifeq ($(HAVE_ZYN_UI_DEPS),true)
LINK_FLAGS += $(shell pkg-config --libs ntk_images ntk)
LINK_FLAGS += $(shell pkg-config --libs ntk_images ntk)
endif
endif

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

LIBS += ../libcarla_engine.a
LIBS += ../libcarla_plugin.a

LIBS += ../../modules/carla_native.a
LIBS += ../../modules/jackbridge.a
LIBS += ../../modules/rtaudio.a
LIBS += ../../modules/rtmidi.a
LIBS += ../../modules/rtmempool.a

# ifeq ($(CARLA_PLUGIN_SUPPORT),true)
# LIBS += ../../modules/lilv.a
# endif
# Final

ifeq ($(HAVE_JUCE),true)
LIBS += ../../modules/juce_audio_basics.a
LIBS += ../../modules/juce_audio_devices.a
LIBS += ../../modules/juce_core.a
# LIBS += ../../modules/juce_data_structures.a
LIBS += ../../modules/juce_events.a
# LIBS += ../../modules/juce_graphics.a
# LIBS += ../../modules/juce_gui_basics.a
STATIC_LIBS += ../../modules/juce_audio_basics.a
STATIC_LIBS += ../../modules/juce_audio_devices.a
STATIC_LIBS += ../../modules/juce_core.a
STATIC_LIBS += ../../modules/juce_data_structures.a
STATIC_LIBS += ../../modules/juce_events.a
STATIC_LIBS += ../../modules/juce_graphics.a
STATIC_LIBS += ../../modules/juce_gui_basics.a
LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
LINK_FLAGS += $(JUCE_AUDIO_DEVICES_LIBS)
LINK_FLAGS += $(JUCE_CORE_LIBS)
LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
LINK_FLAGS += $(JUCE_EVENTS_LIBS)
LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
endif

ifeq ($(HAVE_OPENGL),true)
LIBS += ../../modules/dgl.a
STATIC_LIBS += ../../modules/dgl.a
LINK_FLAGS += $(DGL_LIBS)
endif

# --------------------------------------------------------------
@@ -138,14 +120,14 @@ debug:
%.cpp.o: %.cpp $(HEADERS)
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@

../libcarla_standalone2.dll: CarlaStandalone.cpp.o $(LIBS)
$(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group $(LINK_FLAGS) -shared -Wl,--output-def,$@.def -o $@
../libcarla_standalone2.dll: CarlaStandalone.cpp.o $(STATIC_LIBS)
$(CXX) $< -Wl,--start-group $(STATIC_LIBS) -Wl,--end-group $(LINK_FLAGS) -shared -Wl,--output-def,$@.def -o $@

../libcarla_standalone2.dylib: CarlaStandalone.cpp.o $(LIBS)
$(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group $(LINK_FLAGS) -dynamiclib -o $@
../libcarla_standalone2.dylib: CarlaStandalone.cpp.o $(STATIC_LIBS)
$(CXX) $< -Wl,--start-group $(STATIC_LIBS) -Wl,--end-group $(LINK_FLAGS) -dynamiclib -o $@

../libcarla_standalone2.so: CarlaStandalone.cpp.o $(LIBS)
$(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group $(LINK_FLAGS) -shared -o $@
../libcarla_standalone2.so: CarlaStandalone.cpp.o $(STATIC_LIBS)
$(CXX) $< -Wl,--start-group $(STATIC_LIBS) -Wl,--end-group $(LINK_FLAGS) -shared -o $@

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



+ 9
- 9
source/bridges/Makefile View File

@@ -34,12 +34,12 @@ BUILD_PLUGIN_FLAGS += -DWANT_LADSPA
# endif
endif

# LINK_PLUGIN_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
# LINK_PLUGIN_FLAGS += $(JUCE_CORE_LIBS)
# LINK_PLUGIN_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
# LINK_PLUGIN_FLAGS += $(JUCE_EVENTS_LIBS)
# LINK_PLUGIN_FLAGS += $(JUCE_GRAPHICS_LIBS)
# LINK_PLUGIN_FLAGS += $(JUCE_GUI_BASICS_LIBS)
LINK_PLUGIN_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
LINK_PLUGIN_FLAGS += $(JUCE_CORE_LIBS)
LINK_PLUGIN_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
LINK_PLUGIN_FLAGS += $(JUCE_EVENTS_LIBS)
LINK_PLUGIN_FLAGS += $(JUCE_GRAPHICS_LIBS)
LINK_PLUGIN_FLAGS += $(JUCE_GUI_BASICS_LIBS)

# --------------------------------------------------------------
# Plugin bridges (POSIX)
@@ -393,13 +393,13 @@ OBJS_NATIVE += \
# libs
OBJS_NATIVE += \
../modules/jackbridge.a \
../modules/juce_audio_basics.a \
../modules/juce_core.a \
../modules/juce_events.a \
../modules/rtmempool.a

# ../modules/carla_native.a \
# ../modules/juce_audio_basics.a \
# ../modules/juce_core.a \
# ../modules/juce_data_structures.a \
# ../modules/juce_events.a \
# ../modules/juce_graphics.a \
# ../modules/juce_gui_basics.a \



+ 3
- 0
source/carla View File

@@ -281,6 +281,9 @@ if __name__ == '__main__':
elif os.path.exists(argument):
projectFilename = argument

if libPrefix is not None:
app.addLibraryPath(os.path.join(libPrefix, "lib", "carla"))

# -------------------------------------------------------------
# Init host backend



+ 3
- 0
source/carla-patchbay View File

@@ -69,6 +69,9 @@ if __name__ == '__main__':
elif os.path.exists(argument):
projectFilename = argument

if libPrefix is not None:
app.addLibraryPath(os.path.join(libPrefix, "lib", "carla"))

# -------------------------------------------------------------
# Init host backend



+ 3
- 0
source/carla-rack View File

@@ -69,6 +69,9 @@ if __name__ == '__main__':
elif os.path.exists(argument):
projectFilename = argument

if libPrefix is not None:
app.addLibraryPath(os.path.join(libPrefix, "lib", "carla"))

# -------------------------------------------------------------
# Init host backend



+ 11
- 10
source/carla_style.py View File

@@ -19,11 +19,6 @@
# ------------------------------------------------------------------------------------------------------------
# Imports (Global)

#try:
#from PyQt5.QtCore import QSettings
#from PyQt5.QtGui import QColor, QPalette
#from PyQt5.QtWidgets import QApplication
#except:
from PyQt4.QtCore import QSettings
from PyQt4.QtGui import QApplication, QColor, QPalette

@@ -40,10 +35,8 @@ class CarlaApplication(object):

libdir = os.path.join(CWD, "modules", "theme")

if not os.path.exists(libdir):
libdir = CWD

QApplication.addLibraryPath(libdir)
if os.path.exists(libdir):
QApplication.addLibraryPath(libdir)

self.fApp = QApplication(sys.argv)
self.fApp.setApplicationName(appName)
@@ -175,7 +168,8 @@ class CarlaApplication(object):
self.fPalBlue.setColor(QPalette.Active, QPalette.LinkVisited, QColor(64, 128, 255))
self.fPalBlue.setColor(QPalette.Inactive, QPalette.LinkVisited, QColor(64, 128, 255))

self.loadSettings()
if os.path.exists(libdir):
self.loadSettings()

def loadSettings(self):
settings = QSettings()
@@ -195,6 +189,13 @@ class CarlaApplication(object):

print("Using \"%s\" theme" % self.fApp.style().objectName())

def addLibraryPath(self, libdir):
if not os.path.exists(libdir):
return

QApplication.addLibraryPath(libdir)
self.loadSettings()

def arguments(self):
return self.fApp.arguments()



+ 23
- 27
source/discovery/Makefile View File

@@ -8,18 +8,14 @@ include ../Makefile.mk

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

BUILD_CXX_FLAGS += -I../backend -I../includes -I../modules -I../utils -Wno-multichar
BUILD_CXX_FLAGS += -I../backend -I../includes -I../utils -isystem ../modules -Wno-multichar

BUILD_CXX_FLAGS += $(QTCORE_FLAGS)
LINK_FLAGS += $(QTCORE_LIBS)

# ifeq ($(HAVE_JUCE),true)
# BUILD_CXX_FLAGS += -DHAVE_JUCE
# endif

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

# BUILD_CXX_FLAGS += -DWANT_NATIVE
BUILD_CXX_FLAGS += -DWANT_NATIVE

ifeq ($(CARLA_PLUGIN_SUPPORT),true)
BUILD_CXX_FLAGS += -DWANT_LADSPA
@@ -45,28 +41,28 @@ endif

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

# ifeq ($(HAVE_JUCE),true)
# LIBS += ../modules/juce_audio_basics.a
# LIBS_posix32 += ../modules/juce_audio_basics.posix32.a
# LIBS_posix64 += ../modules/juce_audio_basics.posix64.a
# LIBS_win32 += ../modules/juce_audio_basics.win32.a
# LIBS_win64 += ../modules/juce_audio_basics.win64.a
# LIBS += ../modules/juce_core.a
# LIBS_posix32 += ../modules/juce_core.posix32.a
# LIBS_posix64 += ../modules/juce_core.posix64.a
# LIBS_win32 += ../modules/juce_core.win32.a
# LIBS_win64 += ../modules/juce_core.win64.a
# LINK_FLAGS += $(JUCE_CORE_LIBS) $(JUCE_AUDIO_BASICS_LIBS)
# endif
ifeq ($(CARLA_PLUGIN_SUPPORT),true)
LIBS += ../modules/lilv.a
LIBS_posix32 += ../modules/lilv.posix32.a
LIBS_posix64 += ../modules/lilv.posix64.a
LIBS_win32 += ../modules/lilv.win32.a
LIBS_win64 += ../modules/lilv.win64.a
LINK_FLAGS += $(LILV_LIBS)
endif

# ifeq ($(CARLA_PLUGIN_SUPPORT),true)
# LIBS += ../modules/lilv.a
# LIBS_posix32 += ../modules/lilv.posix32.a
# LIBS_posix64 += ../modules/lilv.posix64.a
# LIBS_win32 += ../modules/lilv.win32.a
# LIBS_win64 += ../modules/lilv.win64.a
# LINK_FLAGS += $(LILV_LIBS)
# endif
ifeq ($(HAVE_JUCE),true)
LIBS += ../modules/juce_audio_basics.a
LIBS_posix32 += ../modules/juce_audio_basics.posix32.a
LIBS_posix64 += ../modules/juce_audio_basics.posix64.a
LIBS_win32 += ../modules/juce_audio_basics.win32.a
LIBS_win64 += ../modules/juce_audio_basics.win64.a
LIBS += ../modules/juce_core.a
LIBS_posix32 += ../modules/juce_core.posix32.a
LIBS_posix64 += ../modules/juce_core.posix64.a
LIBS_win32 += ../modules/juce_core.win32.a
LIBS_win64 += ../modules/juce_core.win64.a
LINK_FLAGS += $(JUCE_CORE_LIBS) $(JUCE_AUDIO_BASICS_LIBS)
endif

POSIX_BUILD_FLAGS = $(BUILD_CXX_FLAGS)
POSIX_32BIT_FLAGS = $(32BIT_FLAGS) -L/usr/lib32 -L/usr/lib/i386-linux-gnu


+ 37
- 9
source/modules/carla_native/Makefile View File

@@ -8,47 +8,64 @@ include ../../Makefile.mk

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

BUILD_C_FLAGS += -I. -I.. -I../../includes
BUILD_CXX_FLAGS += -I. -I.. -I../../includes -I../../utils -I../distrho
BUILD_C_FLAGS += -I. -I../../includes -isystem ..
BUILD_CXX_FLAGS += -I. -I../../includes -I../../utils -I../distrho -isystem ..

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

LINK_FLAGS += -L..
ifeq ($(HAVE_OPENGL),true)
LINK_FLAGS += -ldgl $(DGL_LIBS)
endif
ifeq ($(HAVE_JUCE),true)
LINK_FLAGS += -ljuce_audio_basics $(JUCE_AUDIO_BASICS_LIBS)
LINK_FLAGS += -ljuce_core $(JUCE_CORE_LIBS)
LINK_FLAGS += -ljuce_data_structures $(JUCE_DATA_STRUCTURES_LIBS)
LINK_FLAGS += -ljuce_events $(JUCE_EVENTS_LIBS)
LINK_FLAGS += -ljuce_graphics $(JUCE_GRAPHICS_LIBS)
LINK_FLAGS += -ljuce_gui_basics $(JUCE_GUI_BASICS_LIBS)
endif

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

ALL_C_FLAGS = $(BUILD_C_FLAGS)
ALL_C_FLAGS = $(BUILD_C_FLAGS)

ifeq ($(HAVE_OPENGL),true)
ALL_C_FLAGS += -DWANT_OPENGL
# AudioFile
ifeq ($(HAVE_AF_DEPS),true)
ALL_C_FLAGS += -DWANT_AUDIOFILE
endif

# MidiFile
ifeq ($(HAVE_MF_DEPS),true)
ALL_C_FLAGS += -DWANT_MIDIFILE
endif

# ZynAddSubFX
ifeq ($(HAVE_ZYN_DEPS),true)
ALL_C_FLAGS += -DWANT_ZYNADDSUBFX
endif

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

# AudioFile
ifeq ($(HAVE_AF_DEPS),true)
AF_C_FLAGS = $(BUILD_C_FLAGS)
AF_C_FLAGS += $(shell pkg-config --cflags sndfile)
LINK_FLAGS += $(shell pkg-config --libs sndfile)
ALL_C_FLAGS += -DWANT_AUDIOFILE
ifeq ($(HAVE_FFMPEG),true)
AF_C_FLAGS += -DHAVE_FFMPEG
AF_C_FLAGS += $(shell pkg-config --cflags libavcodec libavformat libavutil)
LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil)
endif
endif

# MidiFile
ifeq ($(HAVE_MF_DEPS),true)
MF_CXX_FLAGS = $(BUILD_CXX_FLAGS)
MF_CXX_FLAGS += $(shell pkg-config --cflags smf)
LINK_FLAGS += $(shell pkg-config --libs smf)
ALL_C_FLAGS += -DWANT_MIDIFILE
endif

# ZynAddSubFX
ifeq ($(HAVE_ZYN_DEPS),true)
ZYN_CXX_FLAGS = $(BUILD_CXX_FLAGS) -w
ZYN_CXX_FLAGS += $(shell pkg-config --cflags fftw3 mxml zlib)
@@ -58,9 +75,10 @@ ZYN_CXX_FLAGS += -DNTK_GUI -DWANT_ZYNADDSUBFX_UI
ZYN_CXX_FLAGS += $(shell pkg-config --cflags ntk_images ntk)
LINK_FLAGS += $(shell pkg-config --libs ntk_images ntk)
endif
ALL_C_FLAGS += -DWANT_ZYNADDSUBFX
endif

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

# Implement carla_register_native_plugin
LINK_FLAGS += -I.. _link.c

@@ -78,6 +96,8 @@ OBJS += \
midi-transpose.c.o \
nekofilter.c.o

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

ifeq ($(HAVE_JUCE),true)
OBJS += \
vex-fx.cpp.o \
@@ -85,6 +105,8 @@ OBJS += \
vex-src.cpp.o
endif

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

ifeq ($(HAVE_OPENGL),true)
OBJS += \
distrho-3bandeq.cpp.o \
@@ -94,6 +116,8 @@ OBJS += \
# distrho-stereoenhancer.cpp.o
endif

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

# AudioFile
ifeq ($(HAVE_AF_DEPS),true)
OBJS += \
@@ -103,12 +127,16 @@ OBJS += \
audio_decoder/ad_soundfile.c.o
endif

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

# MidiFile
ifeq ($(HAVE_MF_DEPS),true)
OBJS += \
midi-file.cpp.o
endif

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

# ZynAddSubFX
ifeq ($(HAVE_ZYN_DEPS),true)
OBJS += \


+ 2
- 2
source/modules/carla_native/_all.c View File

@@ -47,7 +47,7 @@ extern void carla_register_native_plugin_audiofile();
extern void carla_register_native_plugin_midifile();
#endif

#ifdef WANT_OPENGL
#ifdef HAVE_OPENGL
// DISTRHO plugins (OpenGL)
extern void carla_register_native_plugin_3BandEQ();
extern void carla_register_native_plugin_3BandSplitter();
@@ -98,7 +98,7 @@ void carla_register_all_plugins()
carla_register_native_plugin_midifile();
#endif

#ifdef WANT_OPENGL
#ifdef HAVE_OPENGL
// DISTRHO plugins (OpenGL)
carla_register_native_plugin_3BandEQ();
carla_register_native_plugin_3BandSplitter();


+ 5
- 5
source/modules/carla_native/audio-base.hpp View File

@@ -20,7 +20,7 @@

#include "CarlaThread.hpp"

#ifdef USE_JUCE
#ifdef HAVE_JUCE
# include "juce_audio_basics.h"
using juce::FloatVectorOperations;
#endif
@@ -94,7 +94,7 @@ struct AudioFilePool {

startFrame = 0;

#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(buffer[0], size);
FloatVectorOperations::clear(buffer[1], size);
#else
@@ -226,7 +226,7 @@ public:
{
pool.startFrame = fPool.startFrame;

#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::copy(pool.buffer[0], fPool.buffer[0], fPool.size);
FloatVectorOperations::copy(pool.buffer[1], fPool.buffer[1], fPool.size);
#else
@@ -283,8 +283,8 @@ public:

float tmpData[tmpSize];

#ifdef USE_JUCE
FloatVectorOperations::clear(tmpData, tmpSize);
#ifdef HAVE_JUCE
FloatVectorOperations::clear(tmpData, int(tmpSize));
#else
carla_zeroFloat(tmpData, tmpSize);
#endif


+ 3
- 3
source/modules/carla_native/audio-file.cpp View File

@@ -128,7 +128,7 @@ protected:
//carla_stderr("P: no process");
fLastFrame = timePos->frame;

#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(out1, frames);
FloatVectorOperations::clear(out2, frames);
#else
@@ -147,7 +147,7 @@ protected:
if (timePos->frame == 0 && fLastFrame > 0)
fThread.setNeedsRead();

#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(out1, frames);
FloatVectorOperations::clear(out2, frames);
#else
@@ -168,7 +168,7 @@ protected:
if (timePos->frame + frames < fPool.startFrame)
fThread.setNeedsRead();

#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(out1, frames);
FloatVectorOperations::clear(out2, frames);
#else


+ 5
- 5
source/modules/carla_native/zynaddsubfx-fx.cpp View File

@@ -25,8 +25,8 @@
#include "zynaddsubfx/Effects/Phaser.h"
#include "zynaddsubfx/Effects/Reverb.h"

#ifdef USE_JUCE
#include "juce_audio_basics.h"
#ifdef HAVE_JUCE
# include "juce_audio_basics.h"
using juce::FloatVectorOperations;
#endif

@@ -47,7 +47,7 @@ protected:
const uint32_t bufferSize(getBufferSize());
efxoutl = new float[bufferSize];
efxoutr = new float[bufferSize];
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(efxoutl, bufferSize);
FloatVectorOperations::clear(efxoutr, bufferSize);
#else
@@ -139,7 +139,7 @@ protected:
{
fEffect->out(Stereo<float*>(inBuffer[0], inBuffer[1]));

#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::copy(outBuffer[0], efxoutl, frames);
FloatVectorOperations::copy(outBuffer[1], efxoutr, frames);
#else
@@ -155,7 +155,7 @@ protected:
delete[] efxoutr;
efxoutl = new float[bufferSize];
efxoutr = new float[bufferSize];
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(efxoutl, bufferSize);
FloatVectorOperations::clear(efxoutr, bufferSize);
#else


+ 3
- 3
source/modules/carla_native/zynaddsubfx-synth.cpp View File

@@ -51,8 +51,8 @@
#include <set>
#include <string>

#ifdef USE_JUCE
#include "juce_audio_basics.h"
#ifdef HAVE_JUCE
# include "juce_audio_basics.h"
using juce::FloatVectorOperations;
#endif

@@ -625,7 +625,7 @@ protected:
{
if (pthread_mutex_trylock(&fMaster->mutex) != 0)
{
#ifdef USE_JUCE
#ifdef HAVE_JUCE
FloatVectorOperations::clear(outBuffer[0], frames);
FloatVectorOperations::clear(outBuffer[1], frames);
#else


+ 6
- 2
source/modules/theme/Makefile View File

@@ -151,7 +151,11 @@ debug:
$(MAKE) DEBUG=true

install: $(CARLASTYLE) styles/carlastyle.json
install -d $(QT_STYLES_DIR)
install -m 644 $^ $(QT_STYLES_DIR)
install -d $(QT4_STYLES_DIR)
install -m 644 $^ $(QT4_STYLES_DIR)

install-main: $(CARLASTYLE) styles/carlastyle.json
install -d $(STYLES_DIR)
install -m 644 $^ $(STYLES_DIR)

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

+ 18
- 24
source/plugin/Makefile View File

@@ -10,10 +10,6 @@ BUILD_CXX_FLAGS += -I../backend -I../includes -I../utils -isystem ../modules

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

ifeq ($(HAVE_OPENGL),true)
BUILD_CXX_FLAGS += -DWANT_OPENGL
endif

ifeq ($(HAVE_AF_DEPS),true)
BUILD_CXX_FLAGS += -DWANT_AUDIOFILE
endif
@@ -29,8 +25,7 @@ endif
# --------------------------------------------------------------
# Common

LINK_FLAGS += $(shell pkg-config --libs liblo)

LINK_FLAGS += $(LIBLO_LIBS)
LINK_FLAGS += $(QTCORE_LIBS)
LINK_FLAGS += $(QTXML_LIBS)
LINK_FLAGS += $(RTMEMPOOL_LIBS)
@@ -43,9 +38,9 @@ LINK_FLAGS += $(JACKBRIDGE_LIBS)
# --------------------------------------------------------------
# Plugin

# ifeq ($(CARLA_PLUGIN_SUPPORT),true)
# LINK_FLAGS += $(LILV_LIBS)
# endif
ifeq ($(CARLA_PLUGIN_SUPPORT),true)
LINK_FLAGS += $(LILV_LIBS)
endif

# ifeq ($(HAVE_FLUIDSYNTH),true)
# LINK_FLAGS += $(shell pkg-config --libs fluidsynth)
@@ -61,17 +56,13 @@ LINK_FLAGS += $(JACKBRIDGE_LIBS)
# --------------------------------------------------------------
# Coomon

ifeq ($(HAVE_FFMPEG),true)
LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil)
endif

ifeq ($(HAVE_JUCE),true)
LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
LINK_FLAGS += $(JUCE_CORE_LIBS)
# LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
LINK_FLAGS += $(JUCE_EVENTS_LIBS)
# LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
# LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
endif

ifeq ($(HAVE_OPENGL),true)
@@ -83,6 +74,9 @@ endif

ifeq ($(HAVE_AF_DEPS),true)
LINK_FLAGS += $(shell pkg-config --libs sndfile)
ifeq ($(HAVE_FFMPEG),true)
LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil)
endif
endif

ifeq ($(HAVE_MF_DEPS),true)
@@ -99,25 +93,25 @@ endif
# --------------------------------------------------------------
# Libs

LIBS += ../backend/libcarla_engine_plugin.a
LIBS += ../backend/libcarla_plugin.a
LIBS += ../backend/carla_engine_plugin.a
LIBS += ../backend/carla_plugin.a

LIBS += ../modules/carla_native.a
LIBS += ../modules/jackbridge.a
LIBS += ../modules/rtmempool.a

# ifeq ($(CARLA_PLUGIN_SUPPORT),true)
# LIBS += ../modules/lilv.a
# endif
ifeq ($(CARLA_PLUGIN_SUPPORT),true)
LIBS += ../modules/lilv.a
endif

ifeq ($(HAVE_JUCE),true)
LIBS += ../modules/juce_audio_basics.a
# LIBS += ../modules/juce_audio_devices.a
LIBS += ../modules/juce_core.a
# LIBS += ../modules/juce_data_structures.a
LIBS += ../modules/juce_data_structures.a
LIBS += ../modules/juce_events.a
# LIBS += ../modules/juce_graphics.a
# LIBS += ../modules/juce_gui_basics.a
LIBS += ../modules/juce_graphics.a
LIBS += ../modules/juce_gui_basics.a
endif

ifeq ($(HAVE_OPENGL),true)


Loading…
Cancel
Save