Browse Source

Generate a config.h file instead of passing -DHAVE_* stuff; Misc fixes

tags/1.9.6
falkTX 10 years ago
parent
commit
5098d25cf0
21 changed files with 236 additions and 115 deletions
  1. +135
    -31
      Makefile
  2. +12
    -37
      source/Makefile.mk
  3. +10
    -7
      source/backend/Makefile
  4. +3
    -3
      source/backend/engine/CarlaEngineBridge.cpp
  5. +2
    -0
      source/backend/engine/CarlaEngineOsc.cpp
  6. +2
    -0
      source/backend/engine/CarlaEngineOsc.hpp
  7. +2
    -0
      source/backend/engine/CarlaEngineOscSend.cpp
  8. +2
    -2
      source/backend/plugin/CarlaPluginBridge.cpp
  9. +25
    -11
      source/backend/plugin/CarlaPluginLinuxSampler.cpp
  10. +7
    -4
      source/bridges-ui/CarlaBridgeToolkitGtk.cpp
  11. +3
    -2
      source/bridges-ui/CarlaBridgeToolkitQt.cpp
  12. +0
    -3
      source/bridges-ui/CarlaBridgeUI.hpp
  13. +2
    -0
      source/bridges-ui/Makefile
  14. +2
    -4
      source/includes/CarlaDefines.h
  15. +3
    -0
      source/native-plugins/distrho-3bandeq.cpp
  16. +3
    -0
      source/native-plugins/distrho-3bandsplitter.cpp
  17. +3
    -0
      source/native-plugins/distrho-mverb.cpp
  18. +3
    -0
      source/native-plugins/distrho-nekobi.cpp
  19. +3
    -0
      source/native-plugins/distrho-pingpongpan.cpp
  20. +10
    -7
      source/plugin/Makefile
  21. +4
    -4
      source/utils/CarlaBinaryUtils.hpp

+ 135
- 31
Makefile View File

@@ -36,6 +36,113 @@ endif

all: BIN RES UI WIDGETS

# ----------------------------------------------------------------------------------------------------------------------------
# Config

config: source/carla_config.py source/includes/config.h

source/carla_config.py:
@echo "#!/usr/bin/env python3" > $@
@echo "# -*- coding: utf-8 -*-" >> $@
ifeq ($(DEFAULT_QT),4)
@echo "config_UseQt5 = False" >> $@
else
@echo "config_UseQt5 = True" >> $@
endif

source/includes/config.h:
@echo "/* Carla config, auto-generated file */" > $@
@echo "" >> $@

@echo "/* additional audio drivers, Linux only */" >> $@
ifeq ($(HAVE_ALSA),true)
@echo "#define HAVE_ALSA" >> $@
else
@echo "// #define HAVE_ALSA" >> $@
endif
ifeq ($(HAVE_PULSEAUDIO),true)
@echo "#define HAVE_PULSEAUDIO" >> $@
else
@echo "// #define HAVE_PULSEAUDIO" >> $@
endif
@echo "" >> $@

@echo "/* optional libs for extra backend features */" >> $@
ifeq ($(HAVE_LIBLO),true)
@echo "#define HAVE_LIBLO" >> $@
else
@echo "// #define HAVE_LIBLO" >> $@
endif
ifeq ($(HAVE_LIBMAGIC),true)
@echo "#define HAVE_LIBMAGIC" >> $@
else
@echo "// #define HAVE_LIBMAGIC" >> $@
endif
ifeq ($(HAVE_FLUIDSYNTH),true)
@echo "#define HAVE_FLUIDSYNTH" >> $@
else
@echo "// #define HAVE_FLUIDSYNTH" >> $@
endif
ifeq ($(HAVE_LINUXSAMPLER),true)
@echo "#define HAVE_LINUXSAMPLER" >> $@
else
@echo "// #define HAVE_LINUXSAMPLER" >> $@
endif
@echo "" >> $@

@echo "/* optional libs for extra plugins and UIs */" >> $@
ifeq ($(HAVE_DGL),true)
@echo "#define HAVE_DGL" >> $@
else
@echo "// #define HAVE_DGL" >> $@
endif
ifeq ($(HAVE_PROJECTM),true)
@echo "#define HAVE_PROJECTM" >> $@
else
@echo "// #define HAVE_PROJECTM" >> $@
endif
ifeq ($(HAVE_ZYN_DEPS),true)
@echo "#define HAVE_ZYN_DEPS" >> $@
else
@echo "// #define HAVE_ZYN_DEPS" >> $@
endif
ifeq ($(HAVE_ZYN_UI_DEPS),true)
@echo "#define HAVE_ZYN_UI_DEPS" >> $@
else
@echo "// #define HAVE_ZYN_UI_DEPS" >> $@
endif
@echo "" >> $@

@echo "/* extra toolkits/frameworks for plugin UIs (native) */" >> $@
ifeq ($(HAVE_X11),true)
@echo "#define HAVE_X11" >> $@
else
@echo "// #define HAVE_X11" >> $@
endif
@echo "" >> $@

@echo "/* extra toolkits/frameworks for plugin UIs (bridges, Linux only) */" >> $@
ifeq ($(HAVE_GTK2),true)
@echo "#define HAVE_GTK2" >> $@
else
@echo "// #define HAVE_GTK2" >> $@
endif
ifeq ($(HAVE_GTK3),true)
@echo "#define HAVE_GTK3" >> $@
else
@echo "// #define HAVE_GTK3" >> $@
endif
ifeq ($(HAVE_QT4),true)
@echo "#define HAVE_QT4" >> $@
else
@echo "// #define HAVE_QT4" >> $@
endif
ifeq ($(HAVE_QT5),true)
@echo "#define HAVE_QT5" >> $@
else
@echo "// #define HAVE_QT5" >> $@
endif

# ----------------------------------------------------------------------------------------------------------------------------
# Binaries (native)

@@ -81,7 +188,7 @@ ifeq ($(HAVE_QT5),true)
ALL_LIBS += $(MODULEDIR)/theme.qt5.a
endif

libs: $(ALL_LIBS)
libs: config $(ALL_LIBS)

$(MODULEDIR)/carla_engine.a: .FORCE
@$(MAKE) -C source/backend/engine
@@ -140,7 +247,7 @@ discovery: libs
@$(MAKE) -C source/discovery

ifeq ($(LINUX),true)
interposer:
interposer: config
@$(MAKE) -C source/interposer
else
interposer:
@@ -150,7 +257,7 @@ plugin: backend bridges-plugin bridges-ui discovery
@$(MAKE) -C source/plugin

ifeq ($(HAVE_QT),true)
theme:
theme: config
@$(MAKE) -C source/theme
else
theme:
@@ -174,7 +281,7 @@ LIBS_POSIX32 += $(MODULEDIR)/juce_gui_basics.posix32.a
LIBS_POSIX32 += $(MODULEDIR)/juce_gui_extra.posix32.a
endif

posix32: $(LIBS_POSIX32)
posix32: config $(LIBS_POSIX32)
$(MAKE) -C source/bridges-plugin posix32
$(MAKE) -C source/discovery posix32

@@ -196,7 +303,7 @@ LIBS_POSIX64 += $(MODULEDIR)/juce_gui_basics.posix64.a
LIBS_POSIX64 += $(MODULEDIR)/juce_gui_extra.posix64.a
endif

posix64: $(LIBS_POSIX64)
posix64: config $(LIBS_POSIX64)
$(MAKE) -C source/bridges-plugin posix64
$(MAKE) -C source/discovery posix64

@@ -214,7 +321,7 @@ LIBS_WIN32 += $(MODULEDIR)/juce_gui_basics.win32.a
LIBS_WIN32 += $(MODULEDIR)/lilv.win32.a
LIBS_WIN32 += $(MODULEDIR)/rtmempool.win32.a

win32: $(LIBS_WIN32)
win32: config $(LIBS_WIN32)
$(MAKE) -C source/bridges-plugin win32
$(MAKE) -C source/discovery win32

@@ -232,18 +339,18 @@ LIBS_WIN64 += $(MODULEDIR)/juce_gui_basics.win64.a
LIBS_WIN64 += $(MODULEDIR)/lilv.win64.a
LIBS_WIN64 += $(MODULEDIR)/rtmempool.win64.a

win64: $(LIBS_WIN64)
win64: config $(LIBS_WIN64)
$(MAKE) -C source/bridges-plugin win64
$(MAKE) -C source/discovery win64

# ----------------------------------------------------------------------------------------------------------------------------
# Binaries (wine)

wine32:
wine32: config
$(MAKE) -C source/jackbridge wine32
cp -f $(MODULEDIR)/jackbridge-wine32.dll.so $(BINDIR)/jackbridge-wine32.dll

wine64:
wine64: config
$(MAKE) -C source/jackbridge wine64
cp -f $(MODULEDIR)/jackbridge-wine64.dll.so $(BINDIR)/jackbridge-wine64.dll

@@ -293,18 +400,9 @@ RES = \
bin/resources/ui_carla_settings.py \
bin/resources/ui_carla_settings_driver.py \
bin/resources/ui_inputdialog_value.py \
source/carla_config.py \
source/resources_rc.py

RES: $(RES)

source/carla_config.py:
@echo "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n" > $@
ifeq ($(DEFAULT_QT),4)
@echo "config_UseQt5 = False" >> $@
else
@echo "config_UseQt5 = True" >> $@
endif
RES: config $(RES)

source/resources_rc.py: resources/resources.qrc resources/*/*.png resources/*/*.svg
$(PYRCC) $< -o $@
@@ -339,7 +437,7 @@ UIs = \
source/ui_carla_settings_driver.py \
source/ui_inputdialog_value.py

UI: $(UIs)
UI: config $(UIs)

source/ui_%.py: resources/ui/%.ui
$(PYUIC) $< -o $@
@@ -360,7 +458,7 @@ WIDGETS = \
source/pixmapkeyboard.py \
source/racklistwidget.py

WIDGETS: $(WIDGETS)
WIDGETS: config $(WIDGETS)

source/%.py: source/widgets/%.py
$(LINK) widgets/$*.py $@
@@ -378,6 +476,7 @@ clean:
rm -f $(UIs)
rm -f $(WIDGETS)
rm -f *~ source/*~ source/*.pyc source/*_rc.py source/ui_*.py
rm -f source/carla_config.py source/includes/config.h

distclean: clean
rm -f bin/*.dll bin/*.so
@@ -756,21 +855,21 @@ ifeq ($(HAVE_QT5),true)
else
@echo "Qt5: $(ANS_NO) $(mS)Qt5 missing$(mE)"
endif
ifeq ($(MACOS),true)
@echo "Cocoa: $(ANS_YES) (direct+bridge)"
else
@echo "Cocoa: $(ANS_NO) $(mZ)MacOS only$(mE)"
endif
ifeq ($(WIN32),true)
@echo "Windows: $(ANS_YES) (direct+bridge)"
else
@echo "Windows: $(ANS_NO) $(mZ)Windows only$(mE)"
endif
ifeq ($(HAVE_X11),true)
@echo "X11: $(ANS_YES) (direct+bridge)"
else
@echo "X11: $(ANS_NO) $(mS)X11 missing$(mE)"
endif
# ifeq ($(MACOS),true)
# @echo "Cocoa: $(ANS_YES) (direct+bridge)"
# else
# @echo "Cocoa: $(ANS_NO) $(mZ)MacOS only$(mE)"
# endif
# ifeq ($(WIN32),true)
# @echo "Windows: $(ANS_YES) (direct+bridge)"
# else
# @echo "Windows: $(ANS_NO) $(mZ)Windows only$(mE)"
# endif
@echo ""

@echo "$(tS)---> File formats: $(tE)"
@@ -804,6 +903,11 @@ ifeq ($(HAVE_DGL),true)
else
@echo "DISTRHO Plugins:$(ANS_YES) (without UI)"
endif
ifeq ($(HAVE_PROJECTM),true)
@echo "DISTRHO ProM: $(ANS_YES)"
else
@echo "DISTRHO ProM: $(ANS_NO) (missing libprojectM)"
endif
ifeq ($(HAVE_ZYN_DEPS),true)
ifeq ($(HAVE_ZYN_UI_DEPS),true)
@echo "ZynAddSubFX: $(ANS_YES) (with UI)"


+ 12
- 37
source/Makefile.mk View File

@@ -142,15 +142,6 @@ endif
endif
endif

# --------------------------------------------------------------
# Check for required libs

ifeq ($(LINUX),true)
ifeq (,$(wildcard /usr/include/magic.h))
$(error libmagic missing, cannot continue)
endif
endif

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

@@ -173,6 +164,13 @@ HAVE_QT5 = $(shell pkg-config --exists Qt5Core Qt5Gui Qt5Widgets && ech
HAVE_LIBLO = $(shell pkg-config --exists liblo && echo true)
HAVE_FLUIDSYNTH = $(shell pkg-config --exists fluidsynth && echo true)
HAVE_LINUXSAMPLER = $(shell pkg-config --atleast-version=1.0.0.svn41 linuxsampler && echo true)
HAVE_PROJECTM = $(shell pkg-config --exists libprojectM && 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)

# libmagic doesn't have a pkg-config file, so we need to call the compiler to test it
HAVE_LIBMAGIC = $(shell echo '\#include <magic.h>' | $(CC) $(CFLAGS) -x c -w -c - -o .libmagic-tmp 2>/dev/null && echo true)

# --------------------------------------------------------------
# Set Qt tools
@@ -247,35 +245,9 @@ else
DEFAULT_QT ?= 5
endif

# --------------------------------------------------------------
# Check for optional libs (required by internal plugins)

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)

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

ifeq ($(HAVE_DGL),true)
BASE_FLAGS += -DHAVE_DGL
endif

ifeq ($(HAVE_LIBLO),true)
BASE_FLAGS += -DHAVE_LIBLO
endif

ifeq ($(HAVE_FLUIDSYNTH),true)
BASE_FLAGS += -DHAVE_FLUIDSYNTH
endif

ifeq ($(HAVE_LINUXSAMPLER),true)
BASE_FLAGS += -DHAVE_LINUXSAMPLER
endif

ifeq ($(HAVE_X11),true)
BASE_FLAGS += -DHAVE_X11
endif

ifeq ($(CARLA_VESTIGE_HEADER),true)
BASE_FLAGS += -DVESTIGE_HEADER
endif
@@ -298,6 +270,11 @@ LINUXSAMPLER_FLAGS = $(shell pkg-config --cflags linuxsampler) -DIS_CPP11=1 -Wno
LINUXSAMPLER_LIBS = $(shell pkg-config --libs linuxsampler)
endif

ifeq ($(HAVE_PROJECTM),true)
PROJECTM_FLAGS = $(shell pkg-config --cflags libprojectM)
PROJECTM_LIBS = $(shell pkg-config --libs libprojectM)
endif

ifeq ($(HAVE_X11),true)
X11_FLAGS = $(shell pkg-config --cflags x11)
X11_LIBS = $(shell pkg-config --libs x11)
@@ -367,10 +344,8 @@ endif
# Set libs stuff (part 3)

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


+ 10
- 7
source/backend/Makefile View File

@@ -65,7 +65,6 @@ STANDALONE_LINK_FLAGS = $(JACKBRIDGE_LIBS)
STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_FORMATS_LIBS)
STANDALONE_LINK_FLAGS += $(JUCE_CORE_LIBS)
STANDALONE_LINK_FLAGS += $(LIBLO_LIBS)
STANDALONE_LINK_FLAGS += $(LILV_LIBS)
STANDALONE_LINK_FLAGS += $(NATIVE_PLUGINS_LIBS)
STANDALONE_LINK_FLAGS += $(RTMEMPOOL_LIBS)
@@ -85,8 +84,12 @@ STANDALONE_LINK_FLAGS += $(RTAUDIO_LIBS)
STANDALONE_LINK_FLAGS += $(RTMIDI_LIBS)
endif

ifeq ($(HAVE_DGL),true)
STANDALONE_LINK_FLAGS += $(DGL_LIBS)
ifeq ($(HAVE_LIBLO),true)
STANDALONE_LINK_FLAGS += $(LIBLO_LIBS)
endif

ifeq ($(HAVE_LIBMAGIC),true)
STANDALONE_LINK_FLAGS += -lmagic
endif

ifeq ($(HAVE_FLUIDSYNTH),true)
@@ -97,12 +100,12 @@ ifeq ($(HAVE_LINUXSAMPLER),true)
STANDALONE_LINK_FLAGS += $(LINUXSAMPLER_LIBS)
endif

ifeq ($(HAVE_X11),true)
STANDALONE_LINK_FLAGS += $(X11_LIBS)
ifeq ($(HAVE_DGL),true)
STANDALONE_LINK_FLAGS += $(DGL_LIBS)
endif

ifeq ($(UNIX),true)
STANDALONE_LINK_FLAGS += -lmagic
ifeq ($(HAVE_X11),true)
STANDALONE_LINK_FLAGS += $(X11_LIBS)
endif

UTILS_LINK_FLAGS = $(JUCE_AUDIO_BASICS_LIBS)


+ 3
- 3
source/backend/engine/CarlaEngineBridge.cpp View File

@@ -1448,7 +1448,7 @@ protected:
event.ctrl.convertToMidiData(event.channel, size, data);
CARLA_SAFE_ASSERT_CONTINUE(size > 0 && size <= 3);

if (curMidiDataPos + 1 /* size*/ + 4 /* time */ + size >= kBridgeRtClientDataMidiOutSize)
if (curMidiDataPos + 1U /* size*/ + 4U /* time */ + size >= kBridgeRtClientDataMidiOutSize)
break;

// set size
@@ -1462,7 +1462,7 @@ protected:
for (uint8_t j=0; j<size; ++j)
*midiData++ = data[j];

curMidiDataPos += 1 /* size*/ + 4 /* time */ + size;
curMidiDataPos += 1U /* size*/ + 4U /* time */ + size;
}
else if (event.type == kEngineEventTypeMidi)
{
@@ -1486,7 +1486,7 @@ protected:
for (uint8_t j=1; j<_midiEvent.size; ++j)
*midiData++ = _midiData[j];

curMidiDataPos += 1 /* size*/ + 4 /* time */ + _midiEvent.size;
curMidiDataPos += 1U /* size*/ + 4U /* time */ + _midiEvent.size;
}
}



+ 2
- 0
source/backend/engine/CarlaEngineOsc.cpp View File

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

#include "CarlaDefines.h"

#ifdef HAVE_LIBLO

#include "CarlaEngine.hpp"


+ 2
- 0
source/backend/engine/CarlaEngineOsc.hpp View File

@@ -18,6 +18,8 @@
#ifndef CARLA_ENGINE_OSC_HPP_INCLUDED
#define CARLA_ENGINE_OSC_HPP_INCLUDED

#include "CarlaDefines.h"

#ifdef HAVE_LIBLO

#include "CarlaBackend.h"


+ 2
- 0
source/backend/engine/CarlaEngineOscSend.cpp View File

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

#include "CarlaDefines.h"

#ifdef HAVE_LIBLO

#include "CarlaBackendUtils.hpp"


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

@@ -1676,7 +1676,7 @@ public:
midiData = midiData + 1;

// get time as 32bit
time = *(uint32_t*)midiData;
time = *(const uint32_t*)midiData;

// advance 32 bits (4 bytes)
midiData = midiData + 4;
@@ -1689,7 +1689,7 @@ public:

pData->event.portOut->writeMidiEvent(time, size, data);

read += 1 /* size*/ + 4 /* time */ + size;
read += 1U /* size*/ + 4U /* time */ + size;
}

} // End of Control and MIDI Output


+ 25
- 11
source/backend/plugin/CarlaPluginLinuxSampler.cpp View File

@@ -411,7 +411,7 @@ public:
void setCtrlChannel(const int8_t channel, const bool sendOsc, const bool sendCallback) noexcept override
{
if (channel >= 0 && channel < MAX_MIDI_CHANNELS)
pData->prog.current = fCurProgs[channel];
pData->prog.current = static_cast<int32_t>(fCurProgs[channel]);

CarlaPlugin::setCtrlChannel(channel, sendOsc, sendCallback);
}
@@ -438,7 +438,7 @@ public:

if (programList.size() == MAX_MIDI_CHANNELS)
{
int8_t channel = 0;
uint8_t channel = 0;
for (juce::String *it=programList.begin(), *end=programList.end(); it != end; ++it)
{
const int index(it->getIntValue());
@@ -464,15 +464,15 @@ public:
const int8_t channel(kIsGIG ? pData->ctrlChannel : int8_t(0));

if (index >= 0 && channel >= 0)
setProgramInternal(static_cast<uint>(index), channel, sendCallback, false);
setProgramInternal(static_cast<uint>(index), static_cast<uint8_t>(channel), sendCallback, false);

CarlaPlugin::setProgram(index, sendGui, sendOsc, sendCallback);
}

void setProgramInternal(const uint32_t index, const int8_t channel, const bool sendCallback, const bool inRtContent) noexcept
void setProgramInternal(const uint32_t index, const uint8_t channel, const bool sendCallback, const bool inRtContent) noexcept
{
CARLA_SAFE_ASSERT_RETURN(index < pData->prog.count,);
CARLA_SAFE_ASSERT_RETURN(channel >= 0 && channel < MAX_MIDI_CHANNELS,);
CARLA_SAFE_ASSERT_RETURN(channel < MAX_MIDI_CHANNELS,);

if (fCurProgs[channel] == index)
return;
@@ -500,12 +500,14 @@ public:

if (pData->ctrlChannel == channel)
{
pData->prog.current = index;
const int32_t iindex(static_cast<int32_t>(index));

pData->prog.current = iindex;

if (inRtContent)
pData->postponeRtEvent(kPluginPostRtEventProgramChange, static_cast<int32_t>(index), 0, 0.0f);
pData->postponeRtEvent(kPluginPostRtEventProgramChange, iindex, 0, 0.0f);
else if (sendCallback)
pData->engine->callback(ENGINE_CALLBACK_PROGRAM_CHANGED, pData->id, index, 0, 0.0f, nullptr);
pData->engine->callback(ENGINE_CALLBACK_PROGRAM_CHANGED, pData->id, iindex, 0, 0.0f, nullptr);
}
}

@@ -1042,8 +1044,19 @@ public:
// --------------------------------------------------------------------------------------------------------
// Parameter outputs

fParamBuffers[LinuxSamplerDiskStreamCount] = fEngineChannels[0]->GetDiskStreamCount();
fParamBuffers[LinuxSamplerVoiceCount] = fEngineChannels[0]->GetVoiceCount();
uint diskStreamCount=0, voiceCount=0;

for (uint i=0; i<kMaxChannels; ++i)
{
LinuxSampler::EngineChannel* const engineChannel(fEngineChannels[i]);
CARLA_SAFE_ASSERT_CONTINUE(engineChannel != nullptr);

diskStreamCount += engineChannel->GetDiskStreamCount();
/**/ voiceCount += engineChannel->GetVoiceCount();
}

fParamBuffers[LinuxSamplerDiskStreamCount] = static_cast<float>(diskStreamCount);
fParamBuffers[LinuxSamplerVoiceCount] = static_cast<float>(voiceCount);
}

bool processSingle(float** const outBuffer, const uint32_t frames, const uint32_t timeOffset)
@@ -1198,7 +1211,7 @@ public:

samplerChannel->SetEngineType(kIsGIG ? "GIG" : "SFZ");
samplerChannel->SetAudioOutputDevice(&fAudioOutputDevice);
samplerChannel->SetMidiInputDevice(&fMidiInputDevice);
//samplerChannel->SetMidiInputDevice(&fMidiInputDevice);
samplerChannel->SetMidiInputChannel(kUses16Outs ? static_cast<LinuxSampler::midi_chan_t>(i) : LinuxSampler::midi_chan_all);
//samplerChannel->Connect(fMidiInputPort);

@@ -1208,6 +1221,7 @@ public:
engineChannel->Pan(0.0f);
engineChannel->Volume(kIsGIG ? LinuxSampler::kVolumeMax/10.0f : LinuxSampler::kVolumeMax); // FIXME
engineChannel->SetMidiInstrumentMapToDefault();
engineChannel->Connect(fMidiInputPort);

if (kUses16Outs)
{


+ 7
- 4
source/bridges-ui/CarlaBridgeToolkitGtk.cpp View File

@@ -19,7 +19,8 @@

#include <gtk/gtk.h>

#ifdef CARLA_OS_LINUX
#if defined(CARLA_OS_LINUX) && defined(HAVE_X11)
# define USE_CUSTOM_X11_METHODS
# include <gdk/gdkx.h>
#endif

@@ -225,10 +226,11 @@ protected:
CARLA_SAFE_ASSERT_RETURN(fWindow != nullptr,);
carla_debug("CarlaBridgeToolkitGtk::setTransient(0x" P_UINTPTR ")", winId);

#ifdef USE_CUSTOM_X11_METHODS
GdkWindow* const gdkWindow(gtk_widget_get_window(fWindow));
CARLA_SAFE_ASSERT_RETURN(gdkWindow != nullptr,);

#ifdef BRIDGE_GTK3
# ifdef BRIDGE_GTK3
GdkDisplay* const gdkDisplay(gdk_window_get_display(gdkWindow));
CARLA_SAFE_ASSERT_RETURN(gdkDisplay != nullptr,);

@@ -237,15 +239,16 @@ protected:

const ::XID xid(gdk_x11_window_get_xid(gdkWindow));
CARLA_SAFE_ASSERT_RETURN(xid != 0,);
#else
# else
::Display* const display(gdk_x11_drawable_get_xdisplay(gdkWindow));
CARLA_SAFE_ASSERT_RETURN(display != nullptr,);

const ::XID xid(gdk_x11_drawable_get_xid(gdkWindow));
CARLA_SAFE_ASSERT_RETURN(xid != 0,);
#endif
# endif

XSetTransientForHint(display, xid, static_cast< ::Window>(winId));
#endif
}

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


+ 3
- 2
source/bridges-ui/CarlaBridgeToolkitQt.cpp View File

@@ -30,7 +30,8 @@
# include <QtGui/QMainWindow>
#endif

#if defined(CARLA_OS_LINUX) && QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
#if defined(CARLA_OS_LINUX) && defined(HAVE_X11) && QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
# define USE_CUSTOM_X11_METHODS
# include <QtGui/QX11Info>
# include <X11/Xlib.h>
#endif
@@ -116,7 +117,7 @@ public:

if (options.transientWindowId != 0)
{
#if defined(CARLA_OS_LINUX) && QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
#ifdef USE_CUSTOM_X11_METHODS
XSetTransientForHint(QX11Info::display(), static_cast< ::Window>(fWindow->winId()), static_cast< ::Window>(options.transientWindowId));
#endif
}


+ 0
- 3
source/bridges-ui/CarlaBridgeUI.hpp View File

@@ -26,9 +26,6 @@
#include "lv2/atom.h"
#include "lv2/urid.h"

//#include "CarlaBridgeToolkit.hpp"
//#include "CarlaLibUtils.hpp"

CARLA_BRIDGE_START_NAMESPACE

/*!


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

@@ -53,10 +53,12 @@ BUILD_WINDOWS_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_HWND
LINK_WINDOWS_FLAGS = $(LINK_FLAGS) -static -mwindows

ifeq ($(LINUX),true)
ifeq ($(HAVE_X11),true)
LINK_GTK2_FLAGS += -lX11
LINK_GTK3_FLAGS += -lX11
LINK_QT4_FLAGS += -lX11
endif
endif

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



+ 2
- 4
source/includes/CarlaDefines.h View File

@@ -18,10 +18,8 @@
#ifndef CARLA_DEFINES_H_INCLUDED
#define CARLA_DEFINES_H_INCLUDED

/* IDE Helper */
#ifndef REAL_BUILD
# include "config.h"
#endif
/* Configuration */
#include "config.h"

/* Compatibility with non-clang compilers */
#ifndef __has_feature


+ 3
- 0
source/native-plugins/distrho-3bandeq.cpp View File

@@ -66,6 +66,9 @@ END_NAMESPACE_DISTRHO

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

CARLA_EXPORT
void carla_register_native_plugin_distrho_3bandeq();

CARLA_EXPORT
void carla_register_native_plugin_distrho_3bandeq()
{


+ 3
- 0
source/native-plugins/distrho-3bandsplitter.cpp View File

@@ -66,6 +66,9 @@ END_NAMESPACE_DISTRHO

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

CARLA_EXPORT
void carla_register_native_plugin_distrho_3bandsplitter();

CARLA_EXPORT
void carla_register_native_plugin_distrho_3bandsplitter()
{


+ 3
- 0
source/native-plugins/distrho-mverb.cpp View File

@@ -67,6 +67,9 @@ END_NAMESPACE_DISTRHO

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

CARLA_EXPORT
void carla_register_native_plugin_distrho_mverb();

CARLA_EXPORT
void carla_register_native_plugin_distrho_mverb()
{


+ 3
- 0
source/native-plugins/distrho-nekobi.cpp View File

@@ -66,6 +66,9 @@ END_NAMESPACE_DISTRHO

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

CARLA_EXPORT
void carla_register_native_plugin_distrho_nekobi();

CARLA_EXPORT
void carla_register_native_plugin_distrho_nekobi()
{


+ 3
- 0
source/native-plugins/distrho-pingpongpan.cpp View File

@@ -66,6 +66,9 @@ END_NAMESPACE_DISTRHO

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

CARLA_EXPORT
void carla_register_native_plugin_distrho_pingpongpan();

CARLA_EXPORT
void carla_register_native_plugin_distrho_pingpongpan()
{


+ 10
- 7
source/plugin/Makefile View File

@@ -60,7 +60,6 @@ LINK_FLAGS += $(JACKBRIDGE_LIBS)
LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
LINK_FLAGS += $(JUCE_AUDIO_FORMATS_LIBS)
LINK_FLAGS += $(JUCE_CORE_LIBS)
LINK_FLAGS += $(LIBLO_LIBS)
LINK_FLAGS += $(LILV_LIBS)
LINK_FLAGS += $(NATIVE_PLUGINS_LIBS)
LINK_FLAGS += $(RTMEMPOOL_LIBS)
@@ -77,8 +76,12 @@ ifeq ($(MACOS),true)
LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
endif

ifeq ($(HAVE_DGL),true)
LINK_FLAGS += $(DGL_LIBS)
ifeq ($(HAVE_LIBLO),true)
LINK_FLAGS += $(LIBLO_LIBS)
endif

ifeq ($(HAVE_LIBMAGIC),true)
LINK_FLAGS += -lmagic
endif

ifeq ($(HAVE_FLUIDSYNTH),true)
@@ -89,12 +92,12 @@ ifeq ($(HAVE_LINUXSAMPLER),true)
LINK_FLAGS += $(LINUXSAMPLER_LIBS)
endif

ifeq ($(HAVE_X11),true)
LINK_FLAGS += $(X11_LIBS)
ifeq ($(HAVE_DGL),true)
LINK_FLAGS += $(DGL_LIBS)
endif

ifeq ($(UNIX),true)
LINK_FLAGS += -lmagic
ifeq ($(HAVE_X11),true)
LINK_FLAGS += $(X11_LIBS)
endif

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


+ 4
- 4
source/utils/CarlaBinaryUtils.hpp View File

@@ -21,13 +21,13 @@
#include "CarlaBackend.h"
#include "CarlaUtils.hpp"

#if defined(CARLA_OS_UNIX) && ! defined(BUILD_BRIDGE)
# include "magic.h"
#if defined(HAVE_LIBMAGIC) && ! defined(BUILD_BRIDGE)
# include <magic.h>
#endif

CARLA_BACKEND_START_NAMESPACE

#if defined(CARLA_OS_UNIX) && ! defined(BUILD_BRIDGE)
#if defined(HAVE_LIBMAGIC) && ! defined(BUILD_BRIDGE)
// -----------------------------------------------------------------------

class CarlaMagic
@@ -72,7 +72,7 @@ BinaryType getBinaryTypeFromFile(const char* const filename)
if (filename == nullptr || filename[0] == '\0')
return BINARY_NATIVE;

#if defined(CARLA_OS_UNIX) && ! defined(BUILD_BRIDGE)
#if defined(HAVE_LIBMAGIC) && ! defined(BUILD_BRIDGE)
static const CarlaMagic magic;

const char* const output(magic.getFileDescription(filename));


Loading…
Cancel
Save