Browse Source

More cleanup & rework, juce (core) will always be enabled

tags/1.9.4
falkTX 10 years ago
parent
commit
81ed4b6ad0
31 changed files with 158 additions and 1388 deletions
  1. +4
    -3
      Makefile
  2. +27
    -67
      source/Makefile.mk
  3. +11
    -14
      source/backend/CarlaStandalone.cpp
  4. +12
    -13
      source/backend/Makefile
  5. +10
    -36
      source/backend/engine/CarlaEngine.cpp
  6. +0
    -42
      source/backend/engine/CarlaEngineInternal.cpp
  7. +0
    -4
      source/backend/engine/CarlaEngineJuce.cpp
  8. +4
    -11
      source/backend/engine/CarlaEngineNative.cpp
  9. +1
    -5
      source/backend/engine/Makefile
  10. +1
    -1
      source/backend/plugin/AuPlugin.cpp
  11. +0
    -29
      source/backend/plugin/BridgePlugin.cpp
  12. +10
    -21
      source/backend/plugin/CarlaPluginThread.cpp
  13. +1
    -1
      source/backend/plugin/FluidSynthPlugin.cpp
  14. +4
    -6
      source/backend/plugin/JucePlugin.cpp
  15. +1
    -1
      source/backend/plugin/Vst3Plugin.cpp
  16. +3
    -3
      source/backend/plugin/VstPlugin.cpp
  17. +10
    -18
      source/bridges/CarlaBridgePlugin.cpp
  18. +14
    -14
      source/bridges/Makefile
  19. +0
    -1002
      source/bridges/jackplugin/CarlaJackPlugin.cpp
  20. +1
    -9
      source/carla_host.py
  21. +1
    -1
      source/carla_widgets.py
  22. +0
    -2
      source/discovery/Makefile
  23. +1
    -0
      source/discovery/carla-discovery.cpp
  24. +20
    -7
      source/modules/juce_core/AppConfig.h
  25. +1
    -1
      source/modules/native-plugins/Makefile
  26. +2
    -2
      source/modules/native-plugins/_all.c
  27. +8
    -9
      source/plugin/Makefile
  28. +9
    -8
      source/plugin/carla-native-lv2.cpp
  29. +1
    -1
      source/tests/Makefile
  30. +1
    -35
      source/utils/CarlaDssiUtils.cpp
  31. +0
    -22
      source/utils/CarlaStateUtils.cpp

+ 4
- 3
Makefile View File

@@ -46,14 +46,15 @@ endif


ALL_LIBS += source/modules/jackbridge.a ALL_LIBS += source/modules/jackbridge.a


ifeq ($(HAVE_JUCE),true)
ALL_LIBS += source/modules/juce_audio_basics.a ALL_LIBS += source/modules/juce_audio_basics.a
ALL_LIBS += source/modules/juce_audio_devices.a ALL_LIBS += source/modules/juce_audio_devices.a
ALL_LIBS += source/modules/juce_audio_formats.a ALL_LIBS += source/modules/juce_audio_formats.a
ALL_LIBS += source/modules/juce_audio_processors.a
ALL_LIBS += source/modules/juce_core.a ALL_LIBS += source/modules/juce_core.a
ALL_LIBS += source/modules/juce_data_structures.a
ALL_LIBS += source/modules/juce_events.a ALL_LIBS += source/modules/juce_events.a

ifeq ($(HAVE_JUCE_UI),true)
ALL_LIBS += source/modules/juce_audio_processors.a
ALL_LIBS += source/modules/juce_data_structures.a
ALL_LIBS += source/modules/juce_graphics.a ALL_LIBS += source/modules/juce_graphics.a
ALL_LIBS += source/modules/juce_gui_basics.a ALL_LIBS += source/modules/juce_gui_basics.a
ALL_LIBS += source/modules/juce_gui_extra.a ALL_LIBS += source/modules/juce_gui_extra.a


+ 27
- 67
source/Makefile.mk View File

@@ -46,6 +46,13 @@ ifeq ($(WIN32),true)
MACOS_OR_WIN32=true MACOS_OR_WIN32=true
endif endif


# --------------------------------------------------------------
# Force some features on MacOS and Windows

ifeq ($(MACOS_OR_WIN32),true)
CARLA_VESTIGE_HEADER = false
endif

# -------------------------------------------------------------- # --------------------------------------------------------------
# Common build and link flags # Common build and link flags


@@ -141,6 +148,7 @@ endif


# -------------------------------------------------------------- # --------------------------------------------------------------
# Set Qt tools # Set Qt tools
# FIXME


ifeq ($(HAVE_QT4),true) ifeq ($(HAVE_QT4),true)
MOC_QT4 ?= $(shell pkg-config --variable=moc_location QtCore) MOC_QT4 ?= $(shell pkg-config --variable=moc_location QtCore)
@@ -175,6 +183,7 @@ endif


# -------------------------------------------------------------- # --------------------------------------------------------------
# Fail if prefered Qt is not found # Fail if prefered Qt is not found
# FIXME


ifeq ($(DEFAULT_QT),4) ifeq ($(DEFAULT_QT),4)
ifneq ($(HAVE_QT4),true) ifneq ($(HAVE_QT4),true)
@@ -193,64 +202,31 @@ ifneq ($(shell pkg-config --exists liblo && echo true),true)
$(error liblo missing, cannot continue) $(error liblo missing, cannot continue)
endif endif


# --------------------------------------------------------------
# Check for dgl support

ifeq ($(HAIKU),true)
HAVE_DGL = false
endif

ifeq ($(LINUX),true) ifeq ($(LINUX),true)
HAVE_DGL = $(shell pkg-config --exists gl x11 && echo true)
endif

ifeq ($(MACOS),true)
HAVE_DGL = true
endif

ifeq ($(WIN32),true)
HAVE_DGL = true
endif

# --------------------------------------------------------------
# Check for juce UI support

ifeq ($(HAIKU),true)
HAVE_JUCE_UI = false
endif

ifeq ($(LINUX),true)
HAVE_JUCE_UI = $(shell pkg-config --exists x11 xinerama xext xcursor freetype2 && echo true)
endif

ifeq ($(MACOS),true)
HAVE_JUCE_UI = true
ifneq ($(shell pkg-config --exists x11 && echo true),true)
$(error X11 missing, cannot continue)
endif endif

ifeq ($(WIN32),true)
HAVE_JUCE_UI = true
endif endif


# -------------------------------------------------------------- # --------------------------------------------------------------
# Check for optional libs (required by backend or bridges) # Check for optional libs (required by backend or bridges)


ifneq ($(MACOS_OR_WIN32),true)
HAVE_FFMPEG = $(shell pkg-config --exists libavcodec libavformat libavutil && echo true)
HAVE_GTK2 = $(shell pkg-config --exists gtk+-2.0 && echo true)
HAVE_GTK3 = $(shell pkg-config --exists gtk+-3.0 && echo true)
ifeq ($(HAVE_QT4),true)
HAVE_QTGUI4 = $(shell pkg-config --exists QtCore QtGui && echo true)
endif
ifeq ($(HAVE_QT5),true)
HAVE_QTGUI5 = $(shell pkg-config --exists Qt5Core Qt5Gui Qt5Widgets && echo true)
endif
HAVE_WAYLAND = $(shell pkg-config --exists wayland-client && echo true)
HAVE_X11 = $(shell pkg-config --exists x11 && echo true)
endif

ifeq ($(MACOS_OR_WIN32),true)
HAVE_DGL = true
HAVE_JUCE_UI = true
else
HAVE_FFMPEG = $(shell pkg-config --exists libavcodec libavformat libavutil && echo true)
HAVE_GTK2 = $(shell pkg-config --exists gtk+-2.0 && echo true)
HAVE_GTK3 = $(shell pkg-config --exists gtk+-3.0 && echo true)
HAVE_QTGUI4 = $(shell pkg-config --exists QtCore QtGui && echo true)
HAVE_QTGUI5 = $(shell pkg-config --exists Qt5Core Qt5Gui Qt5Widgets && echo true)
ifeq ($(LINUX),true) ifeq ($(LINUX),true)
HAVE_ALSA = $(shell pkg-config --exists alsa && echo true)
HAVE_PULSEAUDIO = $(shell pkg-config --exists libpulse-simple && echo true)
HAVE_ALSA = $(shell pkg-config --exists alsa && echo true)
HAVE_DGL = $(shell pkg-config --exists gl && echo true)
HAVE_JUCE_UI = $(shell pkg-config --exists xinerama xext xcursor freetype2 TODO && echo true)
HAVE_PULSEAUDIO = $(shell pkg-config --exists libpulse-simple && echo true)
HAVE_X11 = true
endif
endif endif


ifeq ($(CARLA_SAMPLERS_SUPPORT),true) ifeq ($(CARLA_SAMPLERS_SUPPORT),true)
@@ -267,13 +243,6 @@ HAVE_PM_DEPS = $(shell pkg-config --exists libprojectM && echo true)
HAVE_ZYN_DEPS = $(shell pkg-config --exists fftw3 mxml zlib && echo true) HAVE_ZYN_DEPS = $(shell pkg-config --exists fftw3 mxml zlib && echo true)
HAVE_ZYN_UI_DEPS = $(shell pkg-config --exists ntk_images ntk && echo true) HAVE_ZYN_UI_DEPS = $(shell pkg-config --exists ntk_images ntk && echo true)


# --------------------------------------------------------------
# Force some features on MacOS and Windows

ifeq ($(MACOS_OR_WIN32),true)
CARLA_VESTIGE_HEADER = false
endif

# -------------------------------------------------------------- # --------------------------------------------------------------
# Set base defines # Set base defines


@@ -289,10 +258,6 @@ ifeq ($(HAVE_JUCE_UI),true)
BASE_FLAGS += -DHAVE_JUCE_UI BASE_FLAGS += -DHAVE_JUCE_UI
endif endif


ifeq ($(HAVE_WAYLAND),true)
BASE_FLAGS += -DHAVE_WAYLAND
endif

ifeq ($(HAVE_X11),true) ifeq ($(HAVE_X11),true)
BASE_FLAGS += -DHAVE_X11 BASE_FLAGS += -DHAVE_X11
endif endif
@@ -321,11 +286,6 @@ LINUXSAMPLER_FLAGS = $(shell pkg-config --cflags linuxsampler) -Wno-unused-param
LINUXSAMPLER_LIBS = $(shell pkg-config --libs linuxsampler) LINUXSAMPLER_LIBS = $(shell pkg-config --libs linuxsampler)
endif endif


ifeq ($(HAVE_WAYLAND),true)
WAYLAND_FLAGS = $(shell pkg-config --cflags wayland-client)
WAYLAND_LIBS = $(shell pkg-config --libs wayland-client)
endif

ifeq ($(HAVE_X11),true) ifeq ($(HAVE_X11),true)
X11_FLAGS = $(shell pkg-config --cflags x11) X11_FLAGS = $(shell pkg-config --cflags x11)
X11_LIBS = $(shell pkg-config --libs x11) X11_LIBS = $(shell pkg-config --libs x11)
@@ -360,10 +320,10 @@ DGL_FLAGS = $(shell pkg-config --cflags gl x11)
DGL_LIBS = $(shell pkg-config --libs gl x11) DGL_LIBS = $(shell pkg-config --libs gl x11)
endif endif
JACKBRIDGE_LIBS = -ldl -lpthread -lrt JACKBRIDGE_LIBS = -ldl -lpthread -lrt
ifeq ($(HAVE_JUCE),true)
JUCE_CORE_LIBS = -ldl -lpthread -lrt JUCE_CORE_LIBS = -ldl -lpthread -lrt
JUCE_EVENTS_FLAGS = $(shell pkg-config --cflags x11) JUCE_EVENTS_FLAGS = $(shell pkg-config --cflags x11)
JUCE_EVENTS_LIBS = $(shell pkg-config --libs x11) JUCE_EVENTS_LIBS = $(shell pkg-config --libs x11)
ifeq ($(HAVE_JUCE_UI),true)
JUCE_GRAPHICS_FLAGS = $(shell pkg-config --cflags x11 xinerama xext freetype2) JUCE_GRAPHICS_FLAGS = $(shell pkg-config --cflags x11 xinerama xext freetype2)
JUCE_GRAPHICS_LIBS = $(shell pkg-config --libs x11 xinerama xext freetype2) JUCE_GRAPHICS_LIBS = $(shell pkg-config --libs x11 xinerama xext freetype2)
JUCE_GUI_BASICS_FLAGS = $(shell pkg-config --cflags x11 xinerama xext xcursor) JUCE_GUI_BASICS_FLAGS = $(shell pkg-config --cflags x11 xinerama xext xcursor)


+ 11
- 14
source/backend/CarlaStandalone.cpp View File

@@ -32,10 +32,10 @@
#include <QtCore/QByteArray> #include <QtCore/QByteArray>


#ifdef BUILD_BRIDGE #ifdef BUILD_BRIDGE
# undef HAVE_JUCE
# undef HAVE_JUCE_UI
#endif #endif


#ifdef HAVE_JUCE
#ifdef HAVE_JUCE_UI
# include "juce_gui_basics.h" # include "juce_gui_basics.h"
using juce::initialiseJuce_GUI; using juce::initialiseJuce_GUI;
using juce::shutdownJuce_GUI; using juce::shutdownJuce_GUI;
@@ -49,7 +49,7 @@ using CB::EngineOptions;
// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
// Juce Message Thread // Juce Message Thread


#if defined(HAVE_JUCE) && defined(CARLA_OS_LINUX)
#if defined(HAVE_JUCE_UI) && defined(CARLA_OS_LINUX)


class JuceMessageThread : public Thread class JuceMessageThread : public Thread
{ {
@@ -104,7 +104,7 @@ private:
CARLA_DECLARE_NON_COPY_CLASS(JuceMessageThread) CARLA_DECLARE_NON_COPY_CLASS(JuceMessageThread)
}; };


#endif // defined(HAVE_JUCE) && defined(CARLA_OS_LINUX)
#endif // defined(HAVE_JUCE_UI) && defined(CARLA_OS_LINUX)


// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
// Single, standalone engine // Single, standalone engine
@@ -120,7 +120,7 @@ struct CarlaBackendStandalone {


CarlaString lastError; CarlaString lastError;


#if defined(HAVE_JUCE) && defined(CARLA_OS_LINUX)
#if defined(HAVE_JUCE_UI) && defined(CARLA_OS_LINUX)
JuceMessageThread juceMsgThread; JuceMessageThread juceMsgThread;
#endif #endif


@@ -148,12 +148,12 @@ struct CarlaBackendStandalone {
~CarlaBackendStandalone() ~CarlaBackendStandalone()
{ {
CARLA_SAFE_ASSERT(engine == nullptr); CARLA_SAFE_ASSERT(engine == nullptr);
#ifdef HAVE_JUCE
#ifdef HAVE_JUCE_UI
CARLA_SAFE_ASSERT(MessageManager::getInstanceWithoutCreating() == nullptr); CARLA_SAFE_ASSERT(MessageManager::getInstanceWithoutCreating() == nullptr);
#endif #endif
} }


#ifdef HAVE_JUCE
#ifdef HAVE_JUCE_UI
void init() void init()
{ {
JUCE_AUTORELEASEPOOL JUCE_AUTORELEASEPOOL
@@ -403,9 +403,6 @@ protected:
//CARLA_SAFE_ASSERT_RETURN(gStandalone.frontendWinId != 0, 0); //CARLA_SAFE_ASSERT_RETURN(gStandalone.frontendWinId != 0, 0);
carla_debug("CarlaNSM::handleShowHideGui(%s)", bool2str(show)); carla_debug("CarlaNSM::handleShowHideGui(%s)", bool2str(show));


#ifdef HAVE_X11
#endif

#ifndef BUILD_ANSI_TEST #ifndef BUILD_ANSI_TEST
lo_send_from(lo_message_get_source(msg), fOscServer, LO_TT_IMMEDIATE, show ? "/nsm/client/gui_is_shown" : "/nsm/client/gui_is_hidden", ""); lo_send_from(lo_message_get_source(msg), fOscServer, LO_TT_IMMEDIATE, show ? "/nsm/client/gui_is_shown" : "/nsm/client/gui_is_hidden", "");
#endif #endif
@@ -879,7 +876,7 @@ bool carla_engine_init(const char* driverName, const char* clientName)
if (gStandalone.engine->init(clientName)) if (gStandalone.engine->init(clientName))
{ {
gStandalone.lastError = "No error"; gStandalone.lastError = "No error";
#ifdef HAVE_JUCE
#ifdef HAVE_JUCE_UI
gStandalone.init(); gStandalone.init();
#endif #endif
return true; return true;
@@ -949,7 +946,7 @@ bool carla_engine_init_bridge(const char audioBaseName[6+1], const char controlB
if (gStandalone.engine->init(clientName)) if (gStandalone.engine->init(clientName))
{ {
gStandalone.lastError = "No error"; gStandalone.lastError = "No error";
#ifdef HAVE_JUCE
#ifdef HAVE_JUCE_UI
gStandalone.init(); gStandalone.init();
#endif #endif
return true; return true;
@@ -983,7 +980,7 @@ bool carla_engine_close()
if (! closed) if (! closed)
gStandalone.lastError = gStandalone.engine->getLastError(); gStandalone.lastError = gStandalone.engine->getLastError();


#ifdef HAVE_JUCE
#ifdef HAVE_JUCE_UI
gStandalone.close(); gStandalone.close();
#endif #endif


@@ -998,7 +995,7 @@ void carla_engine_idle()
CARLA_SAFE_ASSERT_RETURN(gStandalone.engine != nullptr,); CARLA_SAFE_ASSERT_RETURN(gStandalone.engine != nullptr,);


gNSM.idle(); gNSM.idle();
#if defined(HAVE_JUCE) && ! defined(CARLA_OS_LINUX)
#if defined(HAVE_JUCE_UI) && ! defined(CARLA_OS_LINUX)
gStandalone.idle(); gStandalone.idle();
#endif #endif
gStandalone.engine->idle(); gStandalone.engine->idle();


+ 12
- 13
source/backend/Makefile View File

@@ -13,6 +13,11 @@ STANDALONE_LIBS = carla_engine.a
STANDALONE_LIBS += carla_plugin.a STANDALONE_LIBS += carla_plugin.a


STANDALONE_LIBS += ../modules/jackbridge.a STANDALONE_LIBS += ../modules/jackbridge.a
STANDALONE_LIBS += ../modules/juce_audio_basics.a
STANDALONE_LIBS += ../modules/juce_audio_devices.a
STANDALONE_LIBS += ../modules/juce_audio_formats.a
STANDALONE_LIBS += ../modules/juce_core.a
STANDALONE_LIBS += ../modules/juce_events.a
STANDALONE_LIBS += ../modules/native-plugins.a STANDALONE_LIBS += ../modules/native-plugins.a
STANDALONE_LIBS += ../modules/rtaudio.a STANDALONE_LIBS += ../modules/rtaudio.a
STANDALONE_LIBS += ../modules/rtmempool.a STANDALONE_LIBS += ../modules/rtmempool.a
@@ -30,14 +35,9 @@ ifeq ($(HAVE_DGL),true)
STANDALONE_LIBS += ../modules/dgl.a STANDALONE_LIBS += ../modules/dgl.a
endif endif


ifeq ($(HAVE_JUCE),true)
STANDALONE_LIBS += ../modules/juce_audio_basics.a
STANDALONE_LIBS += ../modules/juce_audio_devices.a
STANDALONE_LIBS += ../modules/juce_audio_formats.a
ifeq ($(HAVE_JUCE_UI),true)
STANDALONE_LIBS += ../modules/juce_audio_processors.a STANDALONE_LIBS += ../modules/juce_audio_processors.a
STANDALONE_LIBS += ../modules/juce_core.a
STANDALONE_LIBS += ../modules/juce_data_structures.a STANDALONE_LIBS += ../modules/juce_data_structures.a
STANDALONE_LIBS += ../modules/juce_events.a
STANDALONE_LIBS += ../modules/juce_graphics.a STANDALONE_LIBS += ../modules/juce_graphics.a
STANDALONE_LIBS += ../modules/juce_gui_basics.a STANDALONE_LIBS += ../modules/juce_gui_basics.a
STANDALONE_LIBS += ../modules/juce_gui_extra.a STANDALONE_LIBS += ../modules/juce_gui_extra.a
@@ -47,9 +47,13 @@ endif


STANDALONE_FLAGS = $(LIBLO_LIBS) STANDALONE_FLAGS = $(LIBLO_LIBS)
STANDALONE_FLAGS += $(QTCORE_LIBS) STANDALONE_FLAGS += $(QTCORE_LIBS)
STANDALONE_FLAGS += $(QTXML_LIBS)


STANDALONE_FLAGS += $(JACKBRIDGE_LIBS) STANDALONE_FLAGS += $(JACKBRIDGE_LIBS)
STANDALONE_FLAGS += $(JUCE_CORE_LIBS)
STANDALONE_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
STANDALONE_FLAGS += $(JUCE_AUDIO_DEVICES_LIBS)
STANDALONE_FLAGS += $(JUCE_AUDIO_FORMATS_LIBS)
STANDALONE_FLAGS += $(JUCE_EVENTS_LIBS)
STANDALONE_FLAGS += $(NATIVE_PLUGINS_LIBS) STANDALONE_FLAGS += $(NATIVE_PLUGINS_LIBS)
STANDALONE_FLAGS += $(RTAUDIO_LIBS) STANDALONE_FLAGS += $(RTAUDIO_LIBS)
STANDALONE_FLAGS += $(RTMEMPOOL_LIBS) STANDALONE_FLAGS += $(RTMEMPOOL_LIBS)
@@ -67,14 +71,9 @@ ifeq ($(HAVE_LINUXSAMPLER),true)
STANDALONE_FLAGS += $(LINUXSAMPLER_LIBS) STANDALONE_FLAGS += $(LINUXSAMPLER_LIBS)
endif endif


ifeq ($(HAVE_JUCE),true)
STANDALONE_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
STANDALONE_FLAGS += $(JUCE_AUDIO_DEVICES_LIBS)
STANDALONE_FLAGS += $(JUCE_AUDIO_FORMATS_LIBS)
ifeq ($(HAVE_JUCE_UI),true)
STANDALONE_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS) STANDALONE_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
STANDALONE_FLAGS += $(JUCE_CORE_LIBS)
STANDALONE_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS) STANDALONE_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
STANDALONE_FLAGS += $(JUCE_EVENTS_LIBS)
STANDALONE_FLAGS += $(JUCE_GRAPHICS_LIBS) STANDALONE_FLAGS += $(JUCE_GRAPHICS_LIBS)
STANDALONE_FLAGS += $(JUCE_GUI_BASICS_LIBS) STANDALONE_FLAGS += $(JUCE_GUI_BASICS_LIBS)
STANDALONE_FLAGS += $(JUCE_GUI_EXTRA_LIBS) STANDALONE_FLAGS += $(JUCE_GUI_EXTRA_LIBS)


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

@@ -81,9 +81,7 @@ uint CarlaEngine::getDriverCount()


#ifndef BUILD_BRIDGE #ifndef BUILD_BRIDGE
count += getRtAudioApiCount(); count += getRtAudioApiCount();
# ifdef HAVE_JUCE
count += getJuceApiCount(); count += getJuceApiCount();
# endif
#endif #endif


return count; return count;
@@ -104,10 +102,8 @@ const char* CarlaEngine::getDriverName(const uint index2)


index -= getRtAudioApiCount(); index -= getRtAudioApiCount();


# ifdef HAVE_JUCE
if (index < getJuceApiCount()) if (index < getJuceApiCount())
return getJuceApiName(index); return getJuceApiName(index);
# endif
#endif #endif


carla_stderr("CarlaEngine::getDriverName(%i) - invalid index", index2); carla_stderr("CarlaEngine::getDriverName(%i) - invalid index", index2);
@@ -132,10 +128,8 @@ const char* const* CarlaEngine::getDriverDeviceNames(const uint index2)


index -= getRtAudioApiCount(); index -= getRtAudioApiCount();


# ifdef HAVE_JUCE
if (index < getJuceApiCount()) if (index < getJuceApiCount())
return getJuceApiDeviceNames(index); return getJuceApiDeviceNames(index);
# endif
#endif #endif


carla_stderr("CarlaEngine::getDriverDeviceNames(%i) - invalid index", index2); carla_stderr("CarlaEngine::getDriverDeviceNames(%i) - invalid index", index2);
@@ -164,10 +158,8 @@ const EngineDriverDeviceInfo* CarlaEngine::getDriverDeviceInfo(const uint index2


index -= getRtAudioApiCount(); index -= getRtAudioApiCount();


# ifdef HAVE_JUCE
if (index < getJuceApiCount()) if (index < getJuceApiCount())
return getJuceDeviceInfo(index, deviceName); return getJuceDeviceInfo(index, deviceName);
# endif
#endif #endif


carla_stderr("CarlaEngine::getDriverDeviceNames(%i, \"%s\") - invalid index", index2, deviceName); carla_stderr("CarlaEngine::getDriverDeviceNames(%i, \"%s\") - invalid index", index2, deviceName);
@@ -193,13 +185,8 @@ CarlaEngine* CarlaEngine::newDriverByName(const char* const driverName)
// linux // linux


if (std::strcmp(driverName, "ALSA") == 0) if (std::strcmp(driverName, "ALSA") == 0)
{
# ifdef HAVE_JUCE
return newJuce(AUDIO_API_ALSA);
# else
//return newJuce(AUDIO_API_ALSA);
return newRtAudio(AUDIO_API_ALSA); return newRtAudio(AUDIO_API_ALSA);
# endif
}


if (std::strcmp(driverName, "OSS") == 0) if (std::strcmp(driverName, "OSS") == 0)
return newRtAudio(AUDIO_API_OSS); return newRtAudio(AUDIO_API_OSS);
@@ -210,34 +197,16 @@ CarlaEngine* CarlaEngine::newDriverByName(const char* const driverName)
// macos // macos


if (std::strcmp(driverName, "CoreAudio") == 0) if (std::strcmp(driverName, "CoreAudio") == 0)
{
# ifdef HAVE_JUCE
return newJuce(AUDIO_API_CORE); return newJuce(AUDIO_API_CORE);
# else
return newRtAudio(AUDIO_API_CORE);
# endif
}


// ------------------------------------------------------------------- // -------------------------------------------------------------------
// windows // windows


if (std::strcmp(driverName, "ASIO") == 0) if (std::strcmp(driverName, "ASIO") == 0)
{
# ifdef HAVE_JUCE
return newJuce(AUDIO_API_ASIO); return newJuce(AUDIO_API_ASIO);
# else
return newRtAudio(AUDIO_API_ASIO);
# endif
}


if (std::strcmp(driverName, "DirectSound") == 0) if (std::strcmp(driverName, "DirectSound") == 0)
{
# ifdef HAVE_JUCE
return newJuce(AUDIO_API_DS); return newJuce(AUDIO_API_DS);
# else
return newRtAudio(AUDIO_API_DS);
# endif
}
#endif #endif


carla_stderr("CarlaEngine::newDriverByName(\"%s\") - invalid driver name", driverName); carla_stderr("CarlaEngine::newDriverByName(\"%s\") - invalid driver name", driverName);
@@ -419,7 +388,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, cons
bridgeBinary.clear(); bridgeBinary.clear();
} }


if (ptype != PLUGIN_INTERNAL && ptype != PLUGIN_JACK && (btype != BINARY_NATIVE || (pData->options.preferPluginBridges && bridgeBinary.isNotEmpty())))
if (ptype != PLUGIN_INTERNAL && (btype != BINARY_NATIVE || (pData->options.preferPluginBridges && bridgeBinary.isNotEmpty())))
{ {
if (bridgeBinary.isNotEmpty()) if (bridgeBinary.isNotEmpty())
{ {
@@ -605,12 +574,14 @@ bool CarlaEngine::removePlugin(const uint id)


pData->thread.stopThread(500); pData->thread.stopThread(500);


#ifndef BUILD_BRIDGE
const bool lockWait(isRunning() && pData->options.processMode != ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS); const bool lockWait(isRunning() && pData->options.processMode != ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS);
const ScopedActionLock sal(pData, kEnginePostActionRemovePlugin, id, 0, lockWait); const ScopedActionLock sal(pData, kEnginePostActionRemovePlugin, id, 0, lockWait);


#ifndef BUILD_BRIDGE
if (isOscControlRegistered()) if (isOscControlRegistered())
oscSend_control_remove_plugin(id); oscSend_control_remove_plugin(id);
#else
pData->plugins[0].plugin = nullptr;
#endif #endif


delete plugin; delete plugin;
@@ -763,12 +734,15 @@ bool CarlaEngine::switchPlugins(const uint idA, const uint idB)


pData->thread.stopThread(500); pData->thread.stopThread(500);


#ifndef BUILD_BRIDGE
const bool lockWait(isRunning() && pData->options.processMode != ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS); const bool lockWait(isRunning() && pData->options.processMode != ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS);
const ScopedActionLock sal(pData, kEnginePostActionSwitchPlugins, idA, idB, lockWait); const ScopedActionLock sal(pData, kEnginePostActionSwitchPlugins, idA, idB, lockWait);


#ifndef BUILD_BRIDGE // TODO
// TODO
//if (isOscControlRegistered()) //if (isOscControlRegistered())
// oscSend_control_switch_plugins(idA, idB); // oscSend_control_switch_plugins(idA, idB);
#else
pData->plugins[0].plugin = nullptr;
#endif #endif


if (isRunning() && ! pData->aboutToClose) if (isRunning() && ! pData->aboutToClose)
@@ -1038,7 +1012,7 @@ bool CarlaEngine::loadProject(const char* const filename)


if (CarlaString(stateSave.label).endsWith(kUse16OutsSuffix)) if (CarlaString(stateSave.label).endsWith(kUse16OutsSuffix))
{ {
if (ptype == PLUGIN_FILE_GIG || ptype == PLUGIN_FILE_SF2)
if (ptype == PLUGIN_GIG || ptype == PLUGIN_SF2)
extraStuff = "true"; extraStuff = "true";
} }




+ 0
- 42
source/backend/engine/CarlaEngineInternal.cpp View File

@@ -752,7 +752,6 @@ void CarlaEngine::ProtectedData::processRack(const float* inBufReal[2], float* o
{ {
EnginePluginData& pluginData(plugins[i]); EnginePluginData& pluginData(plugins[i]);


#ifdef HAVE_JUCE
juce::Range<float> range; juce::Range<float> range;


if (oldAudioInCount > 0) if (oldAudioInCount > 0)
@@ -782,47 +781,6 @@ void CarlaEngine::ProtectedData::processRack(const float* inBufReal[2], float* o
pluginData.outsPeak[0] = 0.0f; pluginData.outsPeak[0] = 0.0f;
pluginData.outsPeak[1] = 0.0f; pluginData.outsPeak[1] = 0.0f;
} }
#else
float peak1, peak2;

if (oldAudioInCount > 0)
{
peak1 = peak2 = 0.0f;

for (uint32_t k=0; k < frames; ++k)
{
peak1 = carla_max<float>(peak1, std::fabs(inBuf0[k]), 1.0f);
peak2 = carla_max<float>(peak2, std::fabs(inBuf1[k]), 1.0f);
}

pluginData.insPeak[0] = peak1;
pluginData.insPeak[1] = peak2;
}
else
{
pluginData.insPeak[0] = 0.0f;
pluginData.insPeak[1] = 0.0f;
}

if (plugin->getAudioOutCount() > 0)
{
peak1 = peak2 = 0.0f;

for (uint32_t k=0; k < frames; ++k)
{
peak1 = carla_max<float>(peak1, std::fabs(outBuf[0][k]), 1.0f);
peak2 = carla_max<float>(peak2, std::fabs(outBuf[1][k]), 1.0f);
}

pluginData.outsPeak[0] = peak1;
pluginData.outsPeak[1] = peak2;
}
else
{
pluginData.outsPeak[0] = 0.0f;
pluginData.outsPeak[1] = 0.0f;
}
#endif
} }


processed = true; processed = true;


+ 0
- 4
source/backend/engine/CarlaEngineJuce.cpp View File

@@ -15,10 +15,6 @@
* For a full copy of the GNU General Public License see the GPL.txt file * For a full copy of the GNU General Public License see the GPL.txt file
*/ */


#ifndef HAVE_JUCE
# error This file should not be compiled if Juce is disabled
#endif

#include "CarlaEngineInternal.hpp" #include "CarlaEngineInternal.hpp"
#include "CarlaBackendUtils.hpp" #include "CarlaBackendUtils.hpp"
#include "CarlaStringList.hpp" #include "CarlaStringList.hpp"


+ 4
- 11
source/backend/engine/CarlaEngineNative.cpp View File

@@ -1365,7 +1365,7 @@ protected:


if (CarlaString(stateSave.label).endsWith(kUse16OutsSuffix)) if (CarlaString(stateSave.label).endsWith(kUse16OutsSuffix))
{ {
if (ptype == PLUGIN_FILE_GIG || ptype == PLUGIN_FILE_SF2)
if (ptype == PLUGIN_GIG || ptype == PLUGIN_SF2)
extraStuff = "true"; extraStuff = "true";
} }


@@ -1395,12 +1395,10 @@ public:
return new CarlaEngineNative(host, false); return new CarlaEngineNative(host, false);
} }


#ifdef HAVE_JUCE
static NativePluginHandle _instantiatePatchbay(const NativeHostDescriptor* host) static NativePluginHandle _instantiatePatchbay(const NativeHostDescriptor* host)
{ {
return new CarlaEngineNative(host, true); return new CarlaEngineNative(host, true);
} }
#endif


static void _cleanup(NativePluginHandle handle) static void _cleanup(NativePluginHandle handle)
{ {
@@ -1586,7 +1584,7 @@ static const NativePluginDescriptor carlaRackDesc = {
CarlaEngineNative::_dispatcher CarlaEngineNative::_dispatcher
}; };


#if 0 //def HAVE_JUCE
#if 0
static const NativePluginDescriptor carlaPatchbayDesc = { static const NativePluginDescriptor carlaPatchbayDesc = {
/* category */ ::PLUGIN_CATEGORY_OTHER, /* category */ ::PLUGIN_CATEGORY_OTHER,
/* hints */ static_cast<NativePluginHints>(::PLUGIN_IS_SYNTH|::PLUGIN_HAS_UI|::PLUGIN_NEEDS_FIXED_BUFFERS|::PLUGIN_NEEDS_SINGLE_THREAD|::PLUGIN_USES_STATE|::PLUGIN_USES_TIME), /* hints */ static_cast<NativePluginHints>(::PLUGIN_IS_SYNTH|::PLUGIN_HAS_UI|::PLUGIN_NEEDS_FIXED_BUFFERS|::PLUGIN_NEEDS_SINGLE_THREAD|::PLUGIN_USES_STATE|::PLUGIN_USES_TIME),
@@ -1637,7 +1635,7 @@ void carla_register_native_plugin_carla()
{ {
CARLA_BACKEND_USE_NAMESPACE; CARLA_BACKEND_USE_NAMESPACE;
carla_register_native_plugin(&carlaRackDesc); carla_register_native_plugin(&carlaRackDesc);
#if 0 //def HAVE_JUCE
#if 0
carla_register_native_plugin(&carlaPatchbayDesc); carla_register_native_plugin(&carlaPatchbayDesc);
#endif #endif
} }
@@ -1668,20 +1666,15 @@ const char* CarlaEngine::getRtAudioApiName(const uint) { return nu
const char* const* CarlaEngine::getRtAudioApiDeviceNames(const uint) { return nullptr; } const char* const* CarlaEngine::getRtAudioApiDeviceNames(const uint) { return nullptr; }
const EngineDriverDeviceInfo* CarlaEngine::getRtAudioDeviceInfo(const uint, const char* const) { return nullptr; } const EngineDriverDeviceInfo* CarlaEngine::getRtAudioDeviceInfo(const uint, const char* const) { return nullptr; }


# ifdef HAVE_JUCE
CarlaEngine* CarlaEngine::newJuce(const AudioApi) { return nullptr; } CarlaEngine* CarlaEngine::newJuce(const AudioApi) { return nullptr; }
uint CarlaEngine::getJuceApiCount() { return 0; } uint CarlaEngine::getJuceApiCount() { return 0; }
const char* CarlaEngine::getJuceApiName(const uint) { return nullptr; } const char* CarlaEngine::getJuceApiName(const uint) { return nullptr; }
const char* const* CarlaEngine::getJuceApiDeviceNames(const uint) { return nullptr; } const char* const* CarlaEngine::getJuceApiDeviceNames(const uint) { return nullptr; }
const EngineDriverDeviceInfo* CarlaEngine::getJuceDeviceInfo(const uint, const char* const) { return nullptr; } const EngineDriverDeviceInfo* CarlaEngine::getJuceDeviceInfo(const uint, const char* const) { return nullptr; }
# endif


CARLA_BACKEND_END_NAMESPACE CARLA_BACKEND_END_NAMESPACE


#ifdef WANT_DSSI
# include "CarlaDssiUtils.cpp"
#endif

#include "CarlaDssiUtils.cpp"
#include "CarlaStateUtils.cpp" #include "CarlaStateUtils.cpp"


#endif #endif


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

@@ -19,13 +19,9 @@ OBJS = \


OBJSa = $(OBJS) \ OBJSa = $(OBJS) \
CarlaEngineJack.cpp.o \ CarlaEngineJack.cpp.o \
CarlaEngineJuce.cpp.o \
CarlaEngineRtAudio.cpp.o CarlaEngineRtAudio.cpp.o


ifeq ($(HAVE_JUCE),true)
OBJSa += \
CarlaEngineJuce.cpp.o
endif

ifneq ($(WIN32),true) ifneq ($(WIN32),true)
OBJSa += \ OBJSa += \
CarlaEngineNative.cpp.o CarlaEngineNative.cpp.o


+ 1
- 1
source/backend/plugin/AuPlugin.cpp View File

@@ -25,7 +25,7 @@ CarlaPlugin* CarlaPlugin::newAU(const Initializer& init)
{ {
carla_debug("CarlaPlugin::newAU({%p, \"%s\", \"%s\", " P_INT64 "})", init.engine, init.filename, init.name, init.uniqueId); carla_debug("CarlaPlugin::newAU({%p, \"%s\", \"%s\", " P_INT64 "})", init.engine, init.filename, init.name, init.uniqueId);


#if defined(WANT_AU) && defined(HAVE_JUCE)
#if defined(WANT_AU) && defined(HAVE_JUCE_UI)
return newJuce(init, "AU"); return newJuce(init, "AU");
#else #else
init.engine->setLastError("AU support not available"); init.engine->setLastError("AU support not available");


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

@@ -2106,35 +2106,6 @@ CarlaPlugin* CarlaPlugin::newBridge(const Initializer& init, BinaryType btype, P
#endif #endif
} }


CarlaPlugin* CarlaPlugin::newJACK(const Initializer& init)
{
carla_debug("CarlaPlugin::newJACK({%p, \"%s\", \"%s\", \"%s\", " P_INT64 "})", init.engine, init.filename, init.name, init.label, init.uniqueId);

#ifndef BUILD_BRIDGE
BridgePlugin* const plugin(new BridgePlugin(init.engine, init.id, BINARY_NATIVE, PLUGIN_JACK));

if (! plugin->init(init.filename, init.name, init.label, nullptr))
{
delete plugin;
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 bridged apps, sorry!");
delete plugin;
return nullptr;
}

return plugin;
#else
init.engine->setLastError("JACK app bridge support not available");
return nullptr;
#endif
}

#ifndef BUILD_BRIDGE #ifndef BUILD_BRIDGE
// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------
// Bridge Helper // Bridge Helper


+ 10
- 21
source/backend/plugin/CarlaPluginThread.cpp View File

@@ -192,31 +192,20 @@ void CarlaPluginThread::run()
env.insert("ENGINE_BRIDGE_CLIENT_NAME", name); env.insert("ENGINE_BRIDGE_CLIENT_NAME", name);
env.insert("ENGINE_BRIDGE_OSC_URL", QString("%1/%2").arg(fEngine->getOscServerPathUDP()).arg(fPlugin->getId())); env.insert("ENGINE_BRIDGE_OSC_URL", QString("%1/%2").arg(fEngine->getOscServerPathUDP()).arg(fPlugin->getId()));


//if (fPlugin->getType() != PLUGIN_JACK)
{
#ifndef CARLA_OS_WIN #ifndef CARLA_OS_WIN
if (fBinary.endsWith(".exe"))
{
env.insert("WINEDEBUG", "-all");
arguments << fBinary.buffer();
fBinary = "wine";
}
#endif
/* osc-url */ arguments << QString("%1/%2").arg(fEngine->getOscServerPathUDP()).arg(fPlugin->getId());
/* stype */ arguments << fExtra1.buffer();
/* filename */ arguments << fPlugin->getFilename();
/* name */ arguments << name;
/* label */ arguments << fLabel.buffer();
/* uniqueId */ arguments << QString("%1").arg(fPlugin->getUniqueId());
}
#if 0
else
if (fBinary.endsWith(".exe"))
{ {
env.insert("LD_LIBRARY_PATH", "/home/falktx/FOSS/GIT-mine/Carla/source/bridges/jackplugin/");
carla_stdout("JACK app bridge here, filename: %s", fPlugin->getFilename());
fBinary = fPlugin->getFilename();
env.insert("WINEDEBUG", "-all");
arguments << fBinary.buffer();
fBinary = "wine";
} }
#endif #endif
/* osc-url */ arguments << QString("%1/%2").arg(fEngine->getOscServerPathUDP()).arg(fPlugin->getId());
/* stype */ arguments << fExtra1.buffer();
/* filename */ arguments << fPlugin->getFilename();
/* name */ arguments << name;
/* label */ arguments << fLabel.buffer();
/* uniqueId */ arguments << QString("%1").arg(fPlugin->getUniqueId());
break; break;
} }




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

@@ -131,7 +131,7 @@ public:


PluginType getType() const noexcept override PluginType getType() const noexcept override
{ {
return PLUGIN_FILE_SF2;
return PLUGIN_SF2;
} }


PluginCategory getCategory() const noexcept override PluginCategory getCategory() const noexcept override


+ 4
- 6
source/backend/plugin/JucePlugin.cpp View File

@@ -18,7 +18,7 @@
#include "CarlaPluginInternal.hpp" #include "CarlaPluginInternal.hpp"
#include "CarlaEngine.hpp" #include "CarlaEngine.hpp"


#ifdef HAVE_JUCE
#ifdef HAVE_JUCE_UI


#if defined(CARLA_OS_MAC) #if defined(CARLA_OS_MAC)
/* /*
@@ -1156,7 +1156,7 @@ private:


CARLA_BACKEND_END_NAMESPACE CARLA_BACKEND_END_NAMESPACE


#endif // HAVE_JUCE
#endif // HAVE_JUCE_UI


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


@@ -1166,7 +1166,7 @@ CarlaPlugin* CarlaPlugin::newJuce(const Initializer& init, const char* const for
{ {
carla_debug("CarlaPlugin::newJuce({%p, \"%s\", \"%s\", \"%s\", " P_INT64 "}, %s)", init.engine, init.filename, init.name, init.label, init.uniqueId, format); carla_debug("CarlaPlugin::newJuce({%p, \"%s\", \"%s\", \"%s\", " P_INT64 "}, %s)", init.engine, init.filename, init.name, init.label, init.uniqueId, format);


#ifdef HAVE_JUCE
#ifdef HAVE_JUCE_UI
JucePlugin* const plugin(new JucePlugin(init.engine, init.id)); JucePlugin* const plugin(new JucePlugin(init.engine, init.id));


if (! plugin->init(init.filename, init.name, /*init.label,*/ init.uniqueId, format)) if (! plugin->init(init.filename, init.name, /*init.label,*/ init.uniqueId, format))
@@ -1186,10 +1186,8 @@ CarlaPlugin* CarlaPlugin::newJuce(const Initializer& init, const char* const for


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

// unused
(void)format; (void)format;
#endif #endif
} }


+ 1
- 1
source/backend/plugin/Vst3Plugin.cpp View File

@@ -25,7 +25,7 @@ CarlaPlugin* CarlaPlugin::newVST3(const Initializer& init)
{ {
carla_debug("CarlaPlugin::newVST3({%p, \"%s\", \"%s\", " P_INT64 "})", init.engine, init.filename, init.name, init.uniqueId); carla_debug("CarlaPlugin::newVST3({%p, \"%s\", \"%s\", " P_INT64 "})", init.engine, init.filename, init.name, init.uniqueId);


#if defined(WANT_VST) && defined(HAVE_JUCE)
#if defined(WANT_VST) && defined(HAVE_JUCE_UI)
return newJuce(init, "VST3"); return newJuce(init, "VST3");
#else #else
init.engine->setLastError("VST3 support not available"); init.engine->setLastError("VST3 support not available");


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

@@ -24,7 +24,7 @@
# define USE_JUCE_FOR_VST 1 # define USE_JUCE_FOR_VST 1
#endif #endif


#if defined(WANT_VST) && ! (defined(HAVE_JUCE) && USE_JUCE_FOR_VST)
#if defined(WANT_VST) && ! (defined(HAVE_JUCE_UI) && USE_JUCE_FOR_VST)


#include "CarlaVstUtils.hpp" #include "CarlaVstUtils.hpp"
#include "CarlaMathUtils.hpp" #include "CarlaMathUtils.hpp"
@@ -2552,7 +2552,7 @@ VstPlugin* VstPlugin::sLastVstPlugin = nullptr;


CARLA_BACKEND_END_NAMESPACE CARLA_BACKEND_END_NAMESPACE


#endif // WANT_VST && ! (defined(HAVE_JUCE) && USE_JUCE_FOR_VST)
#endif // WANT_VST && ! (defined(HAVE_JUCE_UI) && USE_JUCE_FOR_VST)


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


@@ -2563,7 +2563,7 @@ CarlaPlugin* CarlaPlugin::newVST(const Initializer& init)
carla_debug("CarlaPlugin::newVST({%p, \"%s\", \"%s\", " P_INT64 "})", init.engine, init.filename, init.name, init.uniqueId); carla_debug("CarlaPlugin::newVST({%p, \"%s\", \"%s\", " P_INT64 "})", init.engine, init.filename, init.name, init.uniqueId);


#ifdef WANT_VST #ifdef WANT_VST
# if defined(HAVE_JUCE) && USE_JUCE_FOR_VST
# if defined(HAVE_JUCE_UI) && USE_JUCE_FOR_VST
return newJuce(init, "VST"); return newJuce(init, "VST");
# else # else
VstPlugin* const plugin(new VstPlugin(init.engine, init.id)); VstPlugin* const plugin(new VstPlugin(init.engine, init.id));


+ 10
- 18
source/bridges/CarlaBridgePlugin.cpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla Bridge Plugin * Carla Bridge Plugin
* Copyright (C) 2012-2013 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -29,7 +29,7 @@
# include <signal.h> # include <signal.h>
#endif #endif


#ifdef HAVE_JUCE
#ifdef HAVE_JUCE_UI
# include "juce_gui_basics.h" # include "juce_gui_basics.h"
using juce::JUCEApplication; using juce::JUCEApplication;
using juce::JUCEApplicationBase; using juce::JUCEApplicationBase;
@@ -95,7 +95,7 @@ static void initSignalHandler()


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


#ifdef HAVE_JUCE
#ifdef HACE_JUCE_UI
static CarlaBridge::CarlaBridgeClient* gBridgeClient = nullptr; static CarlaBridge::CarlaBridgeClient* gBridgeClient = nullptr;


class CarlaJuceApp : public JUCEApplication, class CarlaJuceApp : public JUCEApplication,
@@ -179,10 +179,9 @@ public:
{ {
carla_debug("CarlaPluginClient::~CarlaPluginClient()"); carla_debug("CarlaPluginClient::~CarlaPluginClient()");


#ifdef HAVE_JUCE
#ifdef HACE_JUCE_UI
gBridgeClient = nullptr; gBridgeClient = nullptr;
#endif #endif

carla_engine_close(); carla_engine_close();
} }


@@ -215,7 +214,7 @@ public:
} }
} }


#ifndef HAVE_JUCE
#ifndef HAVE_JUCE_UI
void idle() void idle()
{ {
CARLA_SAFE_ASSERT_RETURN(fEngine != nullptr,); CARLA_SAFE_ASSERT_RETURN(fEngine != nullptr,);
@@ -234,7 +233,6 @@ public:
carla_stderr("Plugin preset save failed, error was:\n%s", fEngine->getLastError()); carla_stderr("Plugin preset save failed, error was:\n%s", fEngine->getLastError());
} }
} }

if (gCloseNow) if (gCloseNow)
{ {
//gCloseNow = false; //gCloseNow = false;
@@ -245,7 +243,7 @@ public:


void exec(int argc, char* argv[]) void exec(int argc, char* argv[])
{ {
#ifdef HAVE_JUCE
#ifdef HAVE_JUCE_UI
gBridgeClient = this; gBridgeClient = this;
JUCEApplicationBase::createInstance = &juce_CreateApplication; JUCEApplicationBase::createInstance = &juce_CreateApplication;
JUCEApplicationBase::main(JUCE_MAIN_FUNCTION_ARGS); JUCEApplicationBase::main(JUCE_MAIN_FUNCTION_ARGS);
@@ -256,6 +254,7 @@ public:
carla_msleep(24); carla_msleep(24);
} }
#endif #endif
// may be unused
return; (void)argc; (void)argv; return; (void)argc; (void)argv;
} }


@@ -427,7 +426,7 @@ int CarlaBridgeOsc::handleMsgShow()
{ {
carla_debug("CarlaBridgeOsc::handleMsgShow()"); carla_debug("CarlaBridgeOsc::handleMsgShow()");


#ifdef HAVE_JUCE
#ifdef HACE_JUCE_UI
const juce::MessageManagerLock mmLock; const juce::MessageManagerLock mmLock;
#endif #endif


@@ -441,7 +440,7 @@ int CarlaBridgeOsc::handleMsgHide()
{ {
carla_debug("CarlaBridgeOsc::handleMsgHide()"); carla_debug("CarlaBridgeOsc::handleMsgHide()");


#ifdef HAVE_JUCE
#ifdef HACE_JUCE_UI
const juce::MessageManagerLock mmLock; const juce::MessageManagerLock mmLock;
#endif #endif


@@ -542,13 +541,6 @@ CARLA_BRIDGE_END_NAMESPACE


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


CarlaPlugin* CarlaPlugin::newJACK(const CarlaPlugin::Initializer&)
{
return nullptr;
}

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

int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
CARLA_BRIDGE_USE_NAMESPACE; CARLA_BRIDGE_USE_NAMESPACE;
@@ -631,7 +623,7 @@ int main(int argc, char* argv[])


const void* extraStuff = nullptr; const void* extraStuff = nullptr;


if (itype == CarlaBackend::PLUGIN_FILE_GIG || itype == CarlaBackend::PLUGIN_FILE_SF2)
if (itype == CarlaBackend::PLUGIN_GIG || itype == CarlaBackend::PLUGIN_SF2)
{ {
if (label == nullptr) if (label == nullptr)
label = clientName; label = clientName;


+ 14
- 14
source/bridges/Makefile View File

@@ -19,10 +19,13 @@ LINK_FLAGS += $(LIBLO_LIBS)


BUILD_PLUGIN_FLAGS = $(BUILD_CXX_FLAGS) -DBUILD_BRIDGE_PLUGIN BUILD_PLUGIN_FLAGS = $(BUILD_CXX_FLAGS) -DBUILD_BRIDGE_PLUGIN
BUILD_PLUGIN_FLAGS += -I../backend/engine -I../backend/plugin BUILD_PLUGIN_FLAGS += -I../backend/engine -I../backend/plugin
BUILD_PLUGIN_FLAGS += $(QTCORE_FLAGS) $(QTXML_FLAGS)
BUILD_PLUGIN_FLAGS += $(QTCORE_FLAGS)


LINK_PLUGIN_FLAGS = $(LINK_FLAGS) LINK_PLUGIN_FLAGS = $(LINK_FLAGS)
LINK_PLUGIN_FLAGS += $(QTCORE_LIBS) $(QTXML_LIBS)
LINK_PLUGIN_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
LINK_PLUGIN_FLAGS += $(JUCE_CORE_LIBS)
LINK_PLUGIN_FLAGS += $(JUCE_EVENTS_LIBS)
LINK_PLUGIN_FLAGS += $(QTCORE_LIBS)


ifeq ($(CARLA_PLUGIN_SUPPORT),true) ifeq ($(CARLA_PLUGIN_SUPPORT),true)
BUILD_PLUGIN_FLAGS += -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST -DWANT_VST3 BUILD_PLUGIN_FLAGS += -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST -DWANT_VST3
@@ -34,12 +37,9 @@ BUILD_PLUGIN_FLAGS += -DVESTIGE_HEADER
endif endif
endif endif


ifeq ($(HAVE_JUCE),true)
LINK_PLUGIN_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
ifeq ($(HAVE_JUCE_UI),true)
LINK_PLUGIN_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS) LINK_PLUGIN_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
LINK_PLUGIN_FLAGS += $(JUCE_CORE_LIBS)
LINK_PLUGIN_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS) LINK_PLUGIN_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
LINK_PLUGIN_FLAGS += $(JUCE_EVENTS_LIBS)
LINK_PLUGIN_FLAGS += $(JUCE_GRAPHICS_LIBS) LINK_PLUGIN_FLAGS += $(JUCE_GRAPHICS_LIBS)
LINK_PLUGIN_FLAGS += $(JUCE_GUI_BASICS_LIBS) LINK_PLUGIN_FLAGS += $(JUCE_GUI_BASICS_LIBS)
endif endif
@@ -418,15 +418,15 @@ OBJS_PLUGIN = \


LIBS_PLUGIN = \ LIBS_PLUGIN = \
../modules/jackbridge.a \ ../modules/jackbridge.a \
../modules/juce_audio_basics.a \
../modules/juce_events.a \
../modules/juce_core.a \
../modules/rtmempool.a ../modules/rtmempool.a


ifeq ($(HAVE_JUCE),true)
ifeq ($(HAVE_JUCE_UI),true)
LIBS_PLUGIN += \ LIBS_PLUGIN += \
../modules/juce_audio_basics.a \
../modules/juce_audio_processors.a \ ../modules/juce_audio_processors.a \
../modules/juce_core.a \
../modules/juce_data_structures.a \ ../modules/juce_data_structures.a \
../modules/juce_events.a \
../modules/juce_data_structures.a \ ../modules/juce_data_structures.a \
../modules/juce_graphics.a \ ../modules/juce_graphics.a \
../modules/juce_gui_basics.a \ ../modules/juce_gui_basics.a \
@@ -489,6 +489,9 @@ OBJS_NATIVE += \
LIBS_NATIVE = \ LIBS_NATIVE = \
../modules/native-plugins.a \ ../modules/native-plugins.a \
../modules/jackbridge.a \ ../modules/jackbridge.a \
../modules/juce_audio_basics.a \
../modules/juce_core.a \
../modules/juce_events.a \
../modules/rtmempool.a ../modules/rtmempool.a


ifeq ($(HAVE_DGL),true) ifeq ($(HAVE_DGL),true)
@@ -496,13 +499,10 @@ LIBS_NATIVE += \
../modules/dgl.a ../modules/dgl.a
endif endif


ifeq ($(HAVE_JUCE),true)
ifeq ($(HAVE_JUCE_UI),true)
LIBS_NATIVE += \ LIBS_NATIVE += \
../modules/juce_audio_basics.a \
../modules/juce_audio_processors.a \ ../modules/juce_audio_processors.a \
../modules/juce_core.a \
../modules/juce_data_structures.a \ ../modules/juce_data_structures.a \
../modules/juce_events.a \
../modules/juce_data_structures.a \ ../modules/juce_data_structures.a \
../modules/juce_graphics.a \ ../modules/juce_graphics.a \
../modules/juce_gui_basics.a \ ../modules/juce_gui_basics.a \


+ 0
- 1002
source/bridges/jackplugin/CarlaJackPlugin.cpp
File diff suppressed because it is too large
View File


+ 1
- 9
source/carla_host.py View File

@@ -337,14 +337,6 @@ class HostWindow(QMainWindow):
# Final setup # Final setup


QTimer.singleShot(0, self.slot_engineStart) QTimer.singleShot(0, self.slot_engineStart)
#QTimer.singleShot(2000, self.slot_test)

#@pyqtSlot()
#def slot_test(self):
#print("test started")
#if not gCarla.host.add_plugin(BINARY_NATIVE, PLUGIN_JACK, "/usr/bin/zita-rev1", "name of client", "label of client", None):
#print(gCarla.host.get_last_error())
#print("test ended")


# ----------------------------------------------------------------- # -----------------------------------------------------------------
# Called by containers # Called by containers
@@ -590,7 +582,7 @@ class HostWindow(QMainWindow):
if rdfItem.UniqueID == uniqueId: if rdfItem.UniqueID == uniqueId:
return pointer(rdfItem) return pointer(rdfItem)


elif ptype in (PLUGIN_FILE_GIG, PLUGIN_FILE_SF2):
elif ptype in (PLUGIN_GIG, PLUGIN_SF2):
if plugin['name'].lower().endswith(" (16 outputs)"): if plugin['name'].lower().endswith(" (16 outputs)"):
return c_char_p("true".encode("utf-8")) return c_char_p("true".encode("utf-8"))




+ 1
- 1
source/carla_widgets.py View File

@@ -1382,7 +1382,7 @@ class PluginEdit(QDialog):
self.fTabIconTimers.append(ICON_STATE_NULL) self.fTabIconTimers.append(ICON_STATE_NULL)


def _updateCtrlMidiProgram(self): def _updateCtrlMidiProgram(self):
if self.fPluginInfo['type'] not in (PLUGIN_INTERNAL, PLUGIN_FILE_SF2):
if self.fPluginInfo['type'] not in (PLUGIN_INTERNAL, PLUGIN_SF2):
return return
elif self.fPluginInfo['category'] != PLUGIN_CATEGORY_SYNTH: elif self.fPluginInfo['category'] != PLUGIN_CATEGORY_SYNTH:
return return


+ 0
- 2
source/discovery/Makefile View File

@@ -56,7 +56,6 @@ LIBS_win64 += ../modules/lilv.win64.a
LINK_FLAGS += $(LILV_LIBS) LINK_FLAGS += $(LILV_LIBS)
endif endif


ifeq ($(HAVE_JUCE),true)
LIBS += ../modules/juce_audio_basics.a LIBS += ../modules/juce_audio_basics.a
LIBS_posix32 += ../modules/juce_audio_basics.posix32.a LIBS_posix32 += ../modules/juce_audio_basics.posix32.a
LIBS_posix64 += ../modules/juce_audio_basics.posix64.a LIBS_posix64 += ../modules/juce_audio_basics.posix64.a
@@ -69,7 +68,6 @@ LIBS_win32 += ../modules/juce_core.win32.a
LIBS_win64 += ../modules/juce_core.win64.a LIBS_win64 += ../modules/juce_core.win64.a
LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS) LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
LINK_FLAGS += $(JUCE_CORE_LIBS) LINK_FLAGS += $(JUCE_CORE_LIBS)
endif


ifeq ($(MACOS_OR_WIN32),true) ifeq ($(MACOS_OR_WIN32),true)
LIBS += ../modules/juce_audio_processors.a LIBS += ../modules/juce_audio_processors.a


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

@@ -20,6 +20,7 @@
#include "CarlaMathUtils.hpp" #include "CarlaMathUtils.hpp"
#include "CarlaMIDI.h" #include "CarlaMIDI.h"


// FIXME
#ifdef HAVE_JUCE #ifdef HAVE_JUCE
# if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) # if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
# define WANT_JUCE_PROCESSORS # define WANT_JUCE_PROCESSORS


+ 20
- 7
source/modules/juce_core/AppConfig.h View File

@@ -69,19 +69,32 @@
#define JUCE_USE_VFORK 1 #define JUCE_USE_VFORK 1
// always enabled
#define JUCE_MODULE_AVAILABLE_juce_audio_basics 1 #define JUCE_MODULE_AVAILABLE_juce_audio_basics 1
#define JUCE_MODULE_AVAILABLE_juce_audio_devices 1 #define JUCE_MODULE_AVAILABLE_juce_audio_devices 1
#define JUCE_MODULE_AVAILABLE_juce_audio_formats 1 #define JUCE_MODULE_AVAILABLE_juce_audio_formats 1
#define JUCE_MODULE_AVAILABLE_juce_audio_processors 1
#define JUCE_MODULE_AVAILABLE_juce_audio_utils 0
#define JUCE_MODULE_AVAILABLE_juce_core 1 #define JUCE_MODULE_AVAILABLE_juce_core 1
#define JUCE_MODULE_AVAILABLE_juce_cryptography 0
#define JUCE_MODULE_AVAILABLE_juce_data_structures 1
#define JUCE_MODULE_AVAILABLE_juce_events 1 #define JUCE_MODULE_AVAILABLE_juce_events 1
#define JUCE_MODULE_AVAILABLE_juce_graphics 1
#define JUCE_MODULE_AVAILABLE_juce_gui_basics 1
#define JUCE_MODULE_AVAILABLE_juce_gui_extra 1
// always disabled
#define JUCE_MODULE_AVAILABLE_juce_audio_utils 0
#define JUCE_MODULE_AVAILABLE_juce_cryptography 0
#define JUCE_MODULE_AVAILABLE_juce_opengl 0 #define JUCE_MODULE_AVAILABLE_juce_opengl 0
#define JUCE_MODULE_AVAILABLE_juce_video 0 #define JUCE_MODULE_AVAILABLE_juce_video 0
// conditional
#ifdef HAVE_JUCE_UI
# define JUCE_MODULE_AVAILABLE_juce_audio_processors 1
# define JUCE_MODULE_AVAILABLE_juce_data_structures 1
# define JUCE_MODULE_AVAILABLE_juce_graphics 1
# define JUCE_MODULE_AVAILABLE_juce_gui_basics 1
# define JUCE_MODULE_AVAILABLE_juce_gui_extra 1
#else
# define JUCE_MODULE_AVAILABLE_juce_audio_processors 0
# define JUCE_MODULE_AVAILABLE_juce_data_structures 0
# define JUCE_MODULE_AVAILABLE_juce_graphics 0
# define JUCE_MODULE_AVAILABLE_juce_gui_basics 0
# define JUCE_MODULE_AVAILABLE_juce_gui_extra 0
#endif
#endif // CARLA_JUCE_CORE_APPCONFIG_H_INCLUDED #endif // CARLA_JUCE_CORE_APPCONFIG_H_INCLUDED

+ 1
- 1
source/modules/native-plugins/Makefile View File

@@ -124,7 +124,7 @@ OBJS += \
distrho-prom.cpp.o distrho-prom.cpp.o
endif endif


ifeq ($(HAVE_JUCE),true)
ifeq ($(HAVE_JUCE_UI),true)
# -------------------------------------------------------------- # --------------------------------------------------------------
# JUCE based plugins # JUCE based plugins




+ 2
- 2
source/modules/native-plugins/_all.c View File

@@ -56,7 +56,7 @@ extern void carla_register_native_plugin_zamtube();
extern void carla_register_native_plugin_zamulticomp(); extern void carla_register_native_plugin_zamulticomp();
extern void carla_register_native_plugin_zamulticompx2(); extern void carla_register_native_plugin_zamulticompx2();


#ifdef HAVE_JUCE
#ifdef HAVE_JUCE_UI
// JUCE based plugins // JUCE based plugins
extern void carla_register_native_plugin_jucepatchbay(); extern void carla_register_native_plugin_jucepatchbay();
extern void carla_register_native_plugin_vex_fx(); extern void carla_register_native_plugin_vex_fx();
@@ -128,7 +128,7 @@ void carla_register_all_plugins()
carla_register_native_plugin_zamulticomp(); carla_register_native_plugin_zamulticomp();
carla_register_native_plugin_zamulticompx2(); carla_register_native_plugin_zamulticompx2();


#ifdef HAVE_JUCE
#ifdef HAVE_JUCE_UI
// JUCE based plugins // JUCE based plugins
carla_register_native_plugin_jucepatchbay(); carla_register_native_plugin_jucepatchbay();
carla_register_native_plugin_vex_fx(); carla_register_native_plugin_vex_fx();


+ 8
- 9
source/plugin/Makefile View File

@@ -15,9 +15,11 @@ BUILD_CXX_FLAGS += $(NATIVE_PLUGINS_FLAGS)
# -------------------------------------------------------------- # --------------------------------------------------------------
# Common # Common


LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
LINK_FLAGS += $(JUCE_CORE_LIBS)
LINK_FLAGS += $(JUCE_EVENTS_LIBS)
LINK_FLAGS += $(LIBLO_LIBS) LINK_FLAGS += $(LIBLO_LIBS)
LINK_FLAGS += $(QTCORE_LIBS) LINK_FLAGS += $(QTCORE_LIBS)
LINK_FLAGS += $(QTXML_LIBS)
LINK_FLAGS += $(RTMEMPOOL_LIBS) LINK_FLAGS += $(RTMEMPOOL_LIBS)


# -------------------------------------------------------------- # --------------------------------------------------------------
@@ -47,12 +49,9 @@ ifeq ($(HAVE_DGL),true)
LINK_FLAGS += $(DGL_LIBS) LINK_FLAGS += $(DGL_LIBS)
endif endif


ifeq ($(HAVE_JUCE),true)
LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
ifeq ($(HAVE_JUCE_UI),true)
LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS) LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_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_GRAPHICS_LIBS)
LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS) LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS) LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
@@ -71,6 +70,9 @@ LIBS += ../backend/carla_plugin.a


LIBS += ../modules/native-plugins.a LIBS += ../modules/native-plugins.a
LIBS += ../modules/jackbridge.a LIBS += ../modules/jackbridge.a
LIBS += ../modules/juce_audio_basics.a
LIBS += ../modules/juce_core.a
LIBS += ../modules/juce_events.a
LIBS += ../modules/rtmempool.a LIBS += ../modules/rtmempool.a


ifeq ($(HAVE_AF_DEPS),true) ifeq ($(HAVE_AF_DEPS),true)
@@ -81,12 +83,9 @@ ifeq ($(HAVE_DGL),true)
LIBS += ../modules/dgl.a LIBS += ../modules/dgl.a
endif endif


ifeq ($(HAVE_JUCE),true)
LIBS += ../modules/juce_audio_basics.a
ifeq ($(HAVE_JUCE_UI),true)
LIBS += ../modules/juce_audio_processors.a LIBS += ../modules/juce_audio_processors.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_graphics.a
LIBS += ../modules/juce_gui_basics.a LIBS += ../modules/juce_gui_basics.a
LIBS += ../modules/juce_gui_extra.a LIBS += ../modules/juce_gui_extra.a


+ 9
- 8
source/plugin/carla-native-lv2.cpp View File

@@ -34,13 +34,14 @@
#include "lv2/lv2_external_ui.h" #include "lv2/lv2_external_ui.h"
#include "lv2/lv2_programs.h" #include "lv2/lv2_programs.h"


#ifdef HAVE_JUCE

#include "juce_audio_basics.h" #include "juce_audio_basics.h"
using juce::FloatVectorOperations;

#ifdef HAVE_JUCE_UI

#include "juce_gui_basics.h" #include "juce_gui_basics.h"


using juce::Array; using juce::Array;
using juce::FloatVectorOperations;
using juce::JUCEApplicationBase; using juce::JUCEApplicationBase;
using juce::MessageManager; using juce::MessageManager;
//using juce::MessageManagerLock; //using juce::MessageManagerLock;
@@ -110,7 +111,7 @@ public:
: fHandle(nullptr), : fHandle(nullptr),
fDescriptor(desc), fDescriptor(desc),
fMidiEventCount(0), fMidiEventCount(0),
#ifdef HAVE_JUCE
#ifdef HAVE_JUCE_UI
fUiWasShown(false), fUiWasShown(false),
#endif #endif
fIsProcessing(false), fIsProcessing(false),
@@ -207,7 +208,7 @@ public:
~NativePlugin() ~NativePlugin()
{ {
CARLA_ASSERT(fHandle == nullptr); CARLA_ASSERT(fHandle == nullptr);
#ifdef HAVE_JUCE
#ifdef HAVE_JUCE_UI
CARLA_ASSERT(! fUiWasShown); CARLA_ASSERT(! fUiWasShown);
#endif #endif


@@ -276,7 +277,7 @@ public:


fHandle = nullptr; fHandle = nullptr;


#ifdef HAVE_JUCE
#ifdef HAVE_JUCE_UI
if (fUiWasShown) if (fUiWasShown)
{ {
CARLA_SAFE_ASSERT_RETURN(gActivePlugins.contains(this),); CARLA_SAFE_ASSERT_RETURN(gActivePlugins.contains(this),);
@@ -716,7 +717,7 @@ protected:
{ {
if (fDescriptor->ui_show != nullptr) if (fDescriptor->ui_show != nullptr)
{ {
#ifdef HAVE_JUCE
#ifdef HAVE_JUCE_UI
if (fDescriptor->hints & PLUGIN_NEEDS_UI_JUCE) if (fDescriptor->hints & PLUGIN_NEEDS_UI_JUCE)
{ {
if (gActivePlugins.size() == 0) if (gActivePlugins.size() == 0)
@@ -894,7 +895,7 @@ private:
NativeMidiEvent fMidiEvents[kMaxMidiEvents*2]; NativeMidiEvent fMidiEvents[kMaxMidiEvents*2];
NativeTimeInfo fTimeInfo; NativeTimeInfo fTimeInfo;


#ifdef HAVE_JUCE
#ifdef HAVE_JUCE_UI
bool fUiWasShown; bool fUiWasShown;
#endif #endif
bool fIsProcessing; bool fIsProcessing;


+ 1
- 1
source/tests/Makefile View File

@@ -90,7 +90,7 @@ CarlaUtils3: CarlaUtils3.cpp ../utils/*.hpp
CarlaUtils4: CarlaUtils4.cpp ../utils/CarlaStateUtils.cpp ../utils/*.hpp CarlaUtils4: CarlaUtils4.cpp ../utils/CarlaStateUtils.cpp ../utils/*.hpp
$(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ \ $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ \
../modules/juce_core.a -ldl -lpthread -lrt \ ../modules/juce_core.a -ldl -lpthread -lrt \
$(shell pkg-config --cflags --libs QtCore QtXml) -isystem /usr/include/qt4
$(shell pkg-config --cflags --libs QtCore) -isystem /usr/include/qt4
valgrind --leak-check=full ./$@ valgrind --leak-check=full ./$@


Exceptions: Exceptions.cpp Exceptions: Exceptions.cpp


+ 1
- 35
source/utils/CarlaDssiUtils.cpp View File

@@ -17,13 +17,7 @@


#include "CarlaDssiUtils.hpp" #include "CarlaDssiUtils.hpp"


#ifdef HAVE_JUCE
# include "juce_core.h"
#else
# include <QtCore/QDir>
# include <QtCore/QFileInfo>
# include <QtCore/QStringList>
#endif
#include "juce_core.h"


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


@@ -34,7 +28,6 @@ const char* find_dssi_ui(const char* const filename, const char* const label) no
carla_debug("find_dssi_ui(\"%s\", \"%s\")", filename, label); carla_debug("find_dssi_ui(\"%s\", \"%s\")", filename, label);


try { try {
#ifdef HAVE_JUCE
using namespace juce; using namespace juce;


String guiFilename; String guiFilename;
@@ -64,34 +57,7 @@ const char* find_dssi_ui(const char* const filename, const char* const label) no
return nullptr; return nullptr;


return carla_strdup(guiFilename.toRawUTF8()); return carla_strdup(guiFilename.toRawUTF8());
#else
QString guiFilename;
QString pluginDir(filename);
pluginDir.resize(pluginDir.lastIndexOf("."));


QString checkLabel(label);
QString checkSName(QFileInfo(pluginDir).baseName());

if (! checkLabel.endsWith("_")) checkLabel += "_";
if (! checkSName.endsWith("_")) checkSName += "_";

QStringList guiFiles(QDir(pluginDir).entryList());

foreach (const QString& gui, guiFiles)
{
if (gui.startsWith(checkLabel) || gui.startsWith(checkSName))
{
QFileInfo finalname(pluginDir + QDir::separator() + gui);
guiFilename = finalname.absoluteFilePath();
break;
}
}

if (guiFilename.isEmpty())
return nullptr;

return carla_strdup(guiFilename.toUtf8().constData());
#endif
} CARLA_SAFE_EXCEPTION_RETURN("find_dssi_ui", nullptr); } CARLA_SAFE_EXCEPTION_RETURN("find_dssi_ui", nullptr);
} }




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

@@ -25,11 +25,6 @@
using juce::String; using juce::String;
using juce::XmlElement; using juce::XmlElement;


#if 0
# include <QtCore/QString>
# include <QtXml/QDomNode>
#endif

CARLA_BACKEND_START_NAMESPACE CARLA_BACKEND_START_NAMESPACE


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@@ -44,17 +39,6 @@ static String xmlSafeString(const String& string, const bool toXml)
else else
return newString.replace("&lt;","<").replace("&gt;",">").replace("&apos;","'").replace("&quot;","\"").replace("&amp;","&"); return newString.replace("&lt;","<").replace("&gt;",">").replace("&apos;","'").replace("&quot;","\"").replace("&amp;","&");
} }
#if 0
static QString xmlSafeString(const QString& string, const bool toXml)
{
QString newString(string);

if (toXml)
return newString.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;").replace("'","&apos;").replace("\"","&quot;");
else
return newString.replace("&lt;","<").replace("&gt;",">").replace("&apos;","'").replace("&quot;","\"").replace("&amp;","&");
}
#endif


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// xmlSafeStringCharDup // xmlSafeStringCharDup
@@ -63,12 +47,6 @@ static const char* xmlSafeStringCharDup(const String& string, const bool toXml)
{ {
return carla_strdup(xmlSafeString(string, toXml).toRawUTF8()); return carla_strdup(xmlSafeString(string, toXml).toRawUTF8());
} }
#if 0
static const char* xmlSafeStringCharDup(const QString& string, const bool toXml)
{
return carla_strdup(xmlSafeString(string, toXml).toUtf8().constData());
}
#endif


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// StateParameter // StateParameter


Loading…
Cancel
Save