Browse Source

Add JACK2 and OpenGL checks to fix some builds

tags/1.9.4
falkTX 11 years ago
parent
commit
c44baffd87
8 changed files with 57 additions and 7 deletions
  1. +6
    -0
      source/Makefile.mk
  2. +5
    -1
      source/backend/CarlaNative.h
  3. +12
    -0
      source/backend/Makefile.mk
  4. +20
    -2
      source/backend/engine/CarlaEngineJack.cpp
  5. +7
    -2
      source/backend/native/Makefile
  6. +2
    -0
      source/backend/plugin/NativePlugin.cpp
  7. +1
    -1
      source/bridges/CarlaBridgePlugin.cpp
  8. +4
    -1
      source/libs/lilv/config/serd_config.h

+ 6
- 0
source/Makefile.mk View File

@@ -53,10 +53,16 @@ BUILD_CXX_FLAGS += -DVESTIGE_HEADER
# --------------------------------------------------------------

HAVE_JACK = $(shell pkg-config --exists jack && echo true)
HAVE_OPENGL = $(shell pkg-config --exists gl && echo true)

HAVE_AF_DEPS = $(shell pkg-config --exists libavcodec libavformat sndfile && echo true)
HAVE_ZYN_DEPS = $(shell pkg-config --exists fftw3 mxml && echo true)

ifeq ($(HAVE_JACK),true)
HAVE_JACK_LATENCY = $(shell pkg-config --atleast-version=0.121.0 jack && echo true)
HAVE_JACK2 = $(shell pkg-config --atleast-version=1.9.0 jack && echo true)
endif

ifeq ($(CARLA_PLUGIN_SUPPORT),true)
HAVE_SUIL = $(shell pkg-config --exists suil-0 && echo true)
endif


+ 5
- 1
source/backend/CarlaNative.h View File

@@ -204,10 +204,14 @@ void carla_register_native_plugin_midiThrough();
void carla_register_native_plugin_midiTranspose();
void carla_register_native_plugin_nekofilter();

// DISTRHO plugins
// DISTRHO plugins (GL)
#ifdef WANT_OPENGL
void carla_register_native_plugin_3BandEQ();
void carla_register_native_plugin_3BandSplitter();
void carla_register_native_plugin_PingPongPan();
#endif

// DISTRHO plugins (Qt)
void carla_register_native_plugin_Notes();

#ifdef WANT_AUDIOFILE


+ 12
- 0
source/backend/Makefile.mk View File

@@ -31,6 +31,18 @@ ifeq ($(HAVE_JACK),true)
BUILD_CXX_FLAGS += -DWANT_JACK
endif

ifeq ($(HAVE_JACK_LATENCY),true)
BUILD_CXX_FLAGS += -DWANT_JACK_LATENCY
endif

ifeq ($(HAVE_JACK2),true)
BUILD_CXX_FLAGS += -DWANT_JACK_PORT_RENAME
endif

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

ifeq ($(HAVE_FLUIDSYNTH),true)
BUILD_CXX_FLAGS += -DWANT_FLUIDSYNTH
endif


+ 20
- 2
source/backend/engine/CarlaEngineJack.cpp View File

@@ -431,6 +431,7 @@ public:
return CarlaEngineClient::isOk();
}

#if WANT_JACK_LATENCY
void setLatency(const uint32_t samples)
{
CarlaEngineClient::setLatency(samples);
@@ -438,6 +439,7 @@ public:
if (kUseClient)
jackbridge_recompute_total_latencies(kClient);
}
#endif

CarlaEnginePort* addPort(const EnginePortType portType, const char* const name, const bool isInput)
{
@@ -576,8 +578,10 @@ public:
jackbridge_set_sample_rate_callback(fClient, carla_jack_srate_callback, this);
jackbridge_set_freewheel_callback(fClient, carla_jack_freewheel_callback, this);
jackbridge_set_process_callback(fClient, carla_jack_process_callback, this);
jackbridge_set_latency_callback(fClient, carla_jack_latency_callback, this);
jackbridge_on_shutdown(fClient, carla_jack_shutdown_callback, this);
# if WANT_JACK_LATENCY
jackbridge_set_latency_callback(fClient, carla_jack_latency_callback, this);
# endif

const char* const jackClientName = jackbridge_get_client_name(fClient);

@@ -588,8 +592,10 @@ public:
jack_set_port_registration_callback(fClient, carla_jack_port_registration_callback, this);
jack_set_port_connect_callback(fClient, carla_jack_port_connect_callback, this);

#ifdef WANT_JACK_PORT_RENAME
if (jack_set_port_rename_callback)
jack_set_port_rename_callback(fClient, carla_jack_port_rename_callback, this);
#endif

if (fOptions.processMode == PROCESS_MODE_CONTINUOUS_RACK)
{
@@ -708,8 +714,10 @@ public:
jackbridge_set_sample_rate_callback(client, carla_jack_srate_callback, this);
jackbridge_set_freewheel_callback(client, carla_jack_freewheel_callback, this);
jackbridge_set_process_callback(client, carla_jack_process_callback, this);
jackbridge_set_latency_callback(client, carla_jack_latency_callback, this);
jackbridge_on_shutdown(client, carla_jack_shutdown_callback, this);
# if WANT_JACK_LATENCY
jackbridge_set_latency_callback(client, carla_jack_latency_callback, this);
# endif
#else
if (fOptions.processMode == PROCESS_MODE_SINGLE_CLIENT)
{
@@ -719,7 +727,9 @@ public:
{
client = jackbridge_client_open(plugin->name(), JackNullOption, nullptr);
jackbridge_set_process_callback(client, carla_jack_process_callback_plugin, plugin);
# if WANT_JACK_LATENCY
jackbridge_set_latency_callback(client, carla_jack_latency_callback_plugin, plugin);
# endif
}
#endif

@@ -1098,6 +1108,7 @@ protected:
proccessPendingEvents();
}

#if WANT_JACK_LATENCY
void handleJackLatencyCallback(const jack_latency_callback_mode_t mode)
{
if (fOptions.processMode != PROCESS_MODE_SINGLE_CLIENT)
@@ -1111,6 +1122,7 @@ protected:
latencyPlugin(plugin, mode);
}
}
#endif

#ifndef BUILD_BRIDGE
void handleJackClientRegistrationCallback(const char* name, bool reg)
@@ -1509,6 +1521,7 @@ private:
setPeaks(plugin->id(), inPeaks, outPeaks);
}

#if WANT_JACK_LATENCY
void latencyPlugin(CarlaPlugin* const plugin, jack_latency_callback_mode_t mode)
{
const uint32_t inCount = plugin->audioInCount();
@@ -1549,6 +1562,7 @@ private:
}
}
}
#endif

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

@@ -1577,10 +1591,12 @@ private:
return 0;
}

#if WANT_JACK_LATENCY
static void carla_jack_latency_callback(jack_latency_callback_mode_t mode, void* arg)
{
handlePtr->handleJackLatencyCallback(mode);
}
#endif

#ifndef BUILD_BRIDGE
static void carla_jack_client_registration_callback(const char* name, int reg, void* arg)
@@ -1634,6 +1650,7 @@ private:
return 0;
}

# if WANT_JACK_LATENCY
static void carla_jack_latency_callback_plugin(jack_latency_callback_mode_t mode, void* arg)
{
CarlaPlugin* const plugin = (CarlaPlugin*)arg;
@@ -1645,6 +1662,7 @@ private:
engine->latencyPlugin(plugin, mode);
}
}
# endif
#endif

CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaEngineJack)


+ 7
- 2
source/backend/native/Makefile View File

@@ -35,11 +35,16 @@ OBJS = \
midi-transpose.c.o \
nekofilter.c.o

# DISTRHO plugins
# DISTRHO plugins (GL)
ifeq ($(HAVE_OPENGL),true)
OBJS += \
distrho-3bandeq.cpp.o \
distrho-3bandsplitter.cpp.o \
distrho-pingpongpan.cpp.o \
distrho-pingpongpan.cpp.o
endif

# DISTRHO plugins (Qt)
OBJS += \
distrho-notes.cpp.o

ifeq ($(HAVE_AF_DEPS),true)


+ 2
- 0
source/backend/plugin/NativePlugin.cpp View File

@@ -1976,9 +1976,11 @@ private:
carla_register_native_plugin_midiTranspose();
carla_register_native_plugin_nekofilter();

# ifdef WANT_OPENGL
carla_register_native_plugin_3BandEQ();
carla_register_native_plugin_3BandSplitter();
carla_register_native_plugin_PingPongPan();
# endif
carla_register_native_plugin_Notes();

# ifdef WANT_AUDIOFILE


+ 1
- 1
source/bridges/CarlaBridgePlugin.cpp View File

@@ -71,7 +71,7 @@ void initSignalHandler()
{
#ifdef CARLA_OS_WIN
SetConsoleCtrlHandler(closeSignalHandler, TRUE);
#else
#elif defined(CARLA_OS_LINUX) || defined(CARLA_OS_HAIKU)
struct sigaction sint;
struct sigaction sterm;
struct sigaction susr1;


+ 4
- 1
source/libs/lilv/config/serd_config.h View File

@@ -4,7 +4,10 @@

#define SERD_VERSION "0.18.2"

#if defined(__APPLE__) || defined(__HAIKU__)
#if defined(__APPLE__)
#define HAVE_FMAX 1
#define HAVE_FILENO 1
#elif defined(__HAIKU__)
#define HAVE_FMAX 1
#define HAVE_FILENO 1
#define HAVE_POSIX_MEMALIGN 1


Loading…
Cancel
Save