From 5202889b0ea90cacf609bc29af22a835e1b42a34 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 12 Jun 2021 15:22:21 +0100 Subject: [PATCH] Always have JACK enabled for example plugins --- Makefile.base.mk | 9 +++------ Makefile.plugins.mk | 11 +++++------ distrho/src/DistrhoPluginJACK.cpp | 10 +++++----- examples/CVPort/Makefile | 3 --- examples/CairoUI/Makefile | 2 -- examples/ExternalUI/Makefile | 3 --- examples/FileHandling/Makefile | 5 ----- examples/ImguiSimpleGain/Makefile | 2 -- examples/Info/Makefile | 5 +---- examples/Meters/Makefile | 2 -- examples/Metronome/Makefile | 10 ---------- examples/MidiThrough/Makefile | 2 -- examples/Parameters/Makefile | 2 -- examples/SendNote/Makefile | 5 ----- examples/States/Makefile | 2 -- 15 files changed, 14 insertions(+), 59 deletions(-) diff --git a/Makefile.base.mk b/Makefile.base.mk index 588b7f1e..aa9f6148 100644 --- a/Makefile.base.mk +++ b/Makefile.base.mk @@ -245,9 +245,11 @@ endif # --------------------------------------------------------------------------------------------------------------------- # Check for optional libraries -HAVE_JACK = $(shell $(PKG_CONFIG) --exists jack && echo true) HAVE_LIBLO = $(shell $(PKG_CONFIG) --exists liblo && echo true) +# backwards compat +HAVE_JACK = true + # --------------------------------------------------------------------------------------------------------------------- # Set Generic DGL stuff @@ -355,11 +357,6 @@ endif # --------------------------------------------------------------------------------------------------------------------- # Set optional libraries specific stuff -ifeq ($(HAVE_JACK),true) -JACK_FLAGS = $(shell $(PKG_CONFIG) --cflags jack) -JACK_LIBS = $(shell $(PKG_CONFIG) --libs jack) -endif - ifeq ($(HAVE_LIBLO),true) LIBLO_FLAGS = $(shell $(PKG_CONFIG) --cflags liblo) LIBLO_LIBS = $(shell $(PKG_CONFIG) --libs liblo) diff --git a/Makefile.plugins.mk b/Makefile.plugins.mk index c27c3fd3..241d702f 100644 --- a/Makefile.plugins.mk +++ b/Makefile.plugins.mk @@ -41,14 +41,13 @@ endif BUILD_C_FLAGS += -I. BUILD_CXX_FLAGS += -I. -I$(DPF_PATH)/distrho -I$(DPF_PATH)/dgl -ifeq ($(HAVE_JACK),true) -BASE_FLAGS += -DHAVE_JACK -endif - ifeq ($(HAVE_LIBLO),true) BASE_FLAGS += -DHAVE_LIBLO endif +# backwards compat +BASE_FLAGS += -DHAVE_JACK + # --------------------------------------------------------------------------------------------------------------------- # Set files to build @@ -214,7 +213,7 @@ $(BUILD_DIR)/DistrhoUI_macOS_%.mm.o: $(DPF_PATH)/distrho/DistrhoUI_macOS.mm $(BUILD_DIR)/DistrhoPluginMain_JACK.cpp.o: $(DPF_PATH)/distrho/DistrhoPluginMain.cpp -@mkdir -p $(BUILD_DIR) @echo "Compiling DistrhoPluginMain.cpp (JACK)" - $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(JACK_FLAGS) -DDISTRHO_PLUGIN_TARGET_JACK -c -o $@ + $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_PLUGIN_TARGET_JACK -c -o $@ $(BUILD_DIR)/DistrhoUIMain_DSSI.cpp.o: $(DPF_PATH)/distrho/DistrhoUIMain.cpp -@mkdir -p $(BUILD_DIR) @@ -233,7 +232,7 @@ $(jack): $(OBJS_DSP) $(BUILD_DIR)/DistrhoPluginMain_JACK.cpp.o endif -@mkdir -p $(shell dirname $@) @echo "Creating JACK standalone for $(NAME)" - $(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(DGL_LIBS) $(JACK_LIBS) -o $@ + $(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(DGL_LIBS) -o $@ # --------------------------------------------------------------------------------------------------------------------- # LADSPA diff --git a/distrho/src/DistrhoPluginJACK.cpp b/distrho/src/DistrhoPluginJACK.cpp index cb6cd240..95fc1a39 100644 --- a/distrho/src/DistrhoPluginJACK.cpp +++ b/distrho/src/DistrhoPluginJACK.cpp @@ -23,7 +23,7 @@ # include "../extra/Sleep.hpp" #endif -#include "jackbridge/JackBridge1.cpp" +#include "jackbridge/JackBridge.cpp" #include "lv2/lv2.h" #ifndef DISTRHO_OS_WINDOWS @@ -714,10 +714,10 @@ private: { DISTRHO_SAFE_ASSERT_RETURN(fPortMidiOutBuffer != nullptr, false); - return jack_midi_event_write(fPortMidiOutBuffer, - midiEvent.frame, - midiEvent.size > MidiEvent::kDataSize ? midiEvent.dataExt : midiEvent.data, - midiEvent.size) == 0; + return jackbridge_midi_event_write(fPortMidiOutBuffer, + midiEvent.frame, + midiEvent.size > MidiEvent::kDataSize ? midiEvent.dataExt : midiEvent.data, + midiEvent.size) == 0; } static bool writeMidiCallback(void* ptr, const MidiEvent& midiEvent) diff --git a/examples/CVPort/Makefile b/examples/CVPort/Makefile index 52ee7bd6..5833735e 100644 --- a/examples/CVPort/Makefile +++ b/examples/CVPort/Makefile @@ -23,10 +23,7 @@ include ../../Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types -ifeq ($(HAVE_JACK),true) TARGETS += jack -endif - TARGETS += lv2_dsp all: $(TARGETS) diff --git a/examples/CairoUI/Makefile b/examples/CairoUI/Makefile index 7ebf2994..742da3df 100644 --- a/examples/CairoUI/Makefile +++ b/examples/CairoUI/Makefile @@ -32,9 +32,7 @@ include ../../Makefile.plugins.mk ifeq ($(HAVE_CAIRO),true) -ifeq ($(HAVE_JACK),true) TARGETS += jack -endif # HAVE_JACK ifneq ($(MACOS_OR_WINDOWS),true) ifeq ($(HAVE_LIBLO),true) diff --git a/examples/ExternalUI/Makefile b/examples/ExternalUI/Makefile index 932db4d5..58476a00 100644 --- a/examples/ExternalUI/Makefile +++ b/examples/ExternalUI/Makefile @@ -31,10 +31,7 @@ endif # -------------------------------------------------------------- # Enable all possible plugin types -ifeq ($(HAVE_JACK),true) TARGETS += jack -endif - TARGETS += dssi TARGETS += lv2_sep diff --git a/examples/FileHandling/Makefile b/examples/FileHandling/Makefile index 4e659587..23cd6399 100644 --- a/examples/FileHandling/Makefile +++ b/examples/FileHandling/Makefile @@ -27,13 +27,8 @@ include ../../Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types -ifeq ($(HAVE_JACK),true) ifeq ($(HAVE_OPENGL),true) TARGETS += jack -endif -endif - -ifeq ($(HAVE_OPENGL),true) TARGETS += lv2_sep else TARGETS += lv2_dsp diff --git a/examples/ImguiSimpleGain/Makefile b/examples/ImguiSimpleGain/Makefile index f398a122..5912cf18 100644 --- a/examples/ImguiSimpleGain/Makefile +++ b/examples/ImguiSimpleGain/Makefile @@ -34,9 +34,7 @@ LINK_FLAGS += $(shell $(PKG_CONFIG) glew --libs) ifeq ($(HAVE_OPENGL),true) -ifeq ($(HAVE_JACK),true) TARGETS += jack -endif # HAVE_JACK ifneq ($(MACOS_OR_WINDOWS),true) ifeq ($(HAVE_LIBLO),true) diff --git a/examples/Info/Makefile b/examples/Info/Makefile index 287ab0c6..e728dab2 100644 --- a/examples/Info/Makefile +++ b/examples/Info/Makefile @@ -28,13 +28,10 @@ include ../../Makefile.plugins.mk ifeq ($(HAVE_OPENGL),true) TARGETS += jack -endif # HAVE_OPENGL - -ifeq ($(HAVE_OPENGL),true) TARGETS += lv2_sep else TARGETS += lv2_dsp -endif +endif # HAVE_OPENGL TARGETS += vst diff --git a/examples/Meters/Makefile b/examples/Meters/Makefile index 1fdbfa24..fbfcc10b 100644 --- a/examples/Meters/Makefile +++ b/examples/Meters/Makefile @@ -28,9 +28,7 @@ include ../../Makefile.plugins.mk ifeq ($(HAVE_OPENGL),true) -ifeq ($(HAVE_JACK),true) TARGETS += jack -endif # HAVE_JACK ifneq ($(MACOS_OR_WINDOWS),true) ifeq ($(HAVE_LIBLO),true) diff --git a/examples/Metronome/Makefile b/examples/Metronome/Makefile index 0cb4c641..72316ea8 100644 --- a/examples/Metronome/Makefile +++ b/examples/Metronome/Makefile @@ -23,18 +23,8 @@ include ../../Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types -ifeq ($(HAVE_JACK),true) -ifeq ($(HAVE_OPENGL),true) TARGETS += jack -endif -endif - -ifeq ($(HAVE_OPENGL),true) -TARGETS += lv2_sep -else TARGETS += lv2_dsp -endif - TARGETS += vst all: $(TARGETS) diff --git a/examples/MidiThrough/Makefile b/examples/MidiThrough/Makefile index 084fb2c7..7cec0047 100644 --- a/examples/MidiThrough/Makefile +++ b/examples/MidiThrough/Makefile @@ -23,9 +23,7 @@ include ../../Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types -ifeq ($(HAVE_JACK),true) TARGETS += jack -endif TARGETS += lv2_dsp TARGETS += vst diff --git a/examples/Parameters/Makefile b/examples/Parameters/Makefile index 2d899211..b4fa95f8 100644 --- a/examples/Parameters/Makefile +++ b/examples/Parameters/Makefile @@ -26,11 +26,9 @@ include ../../Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types -ifeq ($(HAVE_JACK),true) ifeq ($(HAVE_OPENGL),true) TARGETS += jack endif # HAVE_OPENGL -endif # HAVE_JACK ifneq ($(MACOS_OR_WINDOWS),true) TARGETS += ladspa diff --git a/examples/SendNote/Makefile b/examples/SendNote/Makefile index f10bef32..ca2144db 100644 --- a/examples/SendNote/Makefile +++ b/examples/SendNote/Makefile @@ -27,13 +27,8 @@ include ../../Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types -ifeq ($(HAVE_JACK),true) ifeq ($(HAVE_OPENGL),true) TARGETS += jack -endif -endif - -ifeq ($(HAVE_OPENGL),true) TARGETS += lv2_sep else TARGETS += lv2_dsp diff --git a/examples/States/Makefile b/examples/States/Makefile index 25489a34..408bd014 100644 --- a/examples/States/Makefile +++ b/examples/States/Makefile @@ -26,11 +26,9 @@ include ../../Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types -ifeq ($(HAVE_JACK),true) ifeq ($(HAVE_OPENGL),true) TARGETS += jack endif # HAVE_OPENGL -endif # HAVE_JACK ifneq ($(MACOS_OR_WINDOWS),true) TARGETS += dssi