@@ -202,23 +202,26 @@ endif | |||
# Check for optional libs (required by backend or bridges) | |||
ifeq ($(LINUX),true) | |||
HAVE_ALSA = $(shell pkg-config --exists alsa && echo true) | |||
HAVE_HYLIA = true | |||
HAVE_ALSA = $(shell pkg-config --exists alsa && echo true) | |||
HAVE_HYLIA = true | |||
endif | |||
ifeq ($(MACOS),true) | |||
ifneq ($(MACOS_OLD),true) | |||
HAVE_HYLIA = true | |||
HAVE_HYLIA = true | |||
endif | |||
endif | |||
ifneq ($(MACOS_OR_WIN32),true) | |||
HAVE_GTK2 = $(shell pkg-config --exists gtk+-2.0 && echo true) | |||
HAVE_GTK3 = $(shell pkg-config --exists gtk+-3.0 && echo true) | |||
HAVE_PULSEAUDIO = $(shell pkg-config --exists libpulse-simple && echo true) | |||
HAVE_QT4 = $(shell pkg-config --exists QtCore QtGui && echo true) | |||
HAVE_QT5 = $(shell pkg-config --exists Qt5Core Qt5Gui Qt5Widgets && echo true) | |||
HAVE_X11 = $(shell pkg-config --exists x11 && 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_QT4 = $(shell pkg-config --exists QtCore QtGui && echo true) | |||
HAVE_QT5 = $(shell pkg-config --exists Qt5Core Qt5Gui Qt5Widgets && echo true) | |||
HAVE_X11 = $(shell pkg-config --exists x11 && echo true) | |||
endif | |||
ifeq ($(UNIX),true) | |||
HAVE_PULSEAUDIO = $(shell pkg-config --exists libpulse-simple && echo true) | |||
endif | |||
HAVE_FFMPEG = $(shell pkg-config --exists libavcodec libavformat libavutil && echo true) | |||
@@ -416,22 +419,21 @@ endif | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# Set libs stuff (part 2) | |||
RTAUDIO_FLAGS = -DHAVE_GETTIMEOFDAY -D__RTAUDIO_DUMMY__ | |||
RTMIDI_FLAGS = -D__RTMIDI_DUMMY__ | |||
RTAUDIO_FLAGS = -DHAVE_GETTIMEOFDAY -D__RTAUDIO_DUMMY__ | |||
RTMIDI_FLAGS = -D__RTMIDI_DUMMY__ | |||
ifeq ($(DEBUG),true) | |||
RTAUDIO_FLAGS += -D__RTAUDIO_DEBUG__ | |||
RTMIDI_FLAGS += -D__RTMIDI_DEBUG__ | |||
RTAUDIO_FLAGS += -D__RTAUDIO_DEBUG__ | |||
RTMIDI_FLAGS += -D__RTMIDI_DEBUG__ | |||
endif | |||
ifeq ($(UNIX),true) | |||
RTAUDIO_FLAGS += -D__UNIX_JACK__ | |||
endif | |||
RTAUDIO_FLAGS += -D__UNIX_JACK__ | |||
ifeq ($(HAVE_PULSEAUDIO),true) | |||
RTAUDIO_FLAGS += $(shell pkg-config --cflags libpulse-simple) -D__LINUX_PULSE__ | |||
RTAUDIO_FLAGS += $(shell pkg-config --cflags libpulse-simple) -D__UNIX_PULSE__ | |||
RTAUDIO_LIBS += $(shell pkg-config --libs libpulse-simple) | |||
endif | |||
endif | |||
ifeq ($(BSD),true) | |||
JACKBRIDGE_LIBS = -lpthread -lrt | |||
@@ -71,10 +71,10 @@ static const char* getRtAudioApiName(const RtAudio::Api api) noexcept | |||
return "Unspecified"; | |||
case RtAudio::LINUX_ALSA: | |||
return "ALSA"; | |||
case RtAudio::LINUX_PULSE: | |||
return "PulseAudio"; | |||
case RtAudio::LINUX_OSS: | |||
return "OSS"; | |||
case RtAudio::UNIX_PULSE: | |||
return "PulseAudio"; | |||
case RtAudio::UNIX_JACK: | |||
#if defined(CARLA_OS_WIN) | |||
return "JACK with WinMM"; | |||
@@ -112,7 +112,7 @@ static RtMidi::Api getMatchedAudioMidiAPI(const RtAudio::Api rtApi) noexcept | |||
case RtAudio::LINUX_OSS: | |||
return RtMidi::LINUX_ALSA; | |||
case RtAudio::LINUX_PULSE: | |||
case RtAudio::UNIX_PULSE: | |||
#if defined(CARLA_OS_LINUX) | |||
return RtMidi::LINUX_ALSA; | |||
#else | |||
@@ -258,7 +258,7 @@ public: | |||
iParams.nChannels = carla_fixedValue(0U, 128U, iParams.nChannels); | |||
oParams.nChannels = carla_fixedValue(0U, 128U, oParams.nChannels); | |||
fAudioInterleaved = fAudio.getCurrentApi() == RtAudio::LINUX_PULSE; | |||
fAudioInterleaved = fAudio.getCurrentApi() == RtAudio::UNIX_PULSE; | |||
} | |||
RtAudio::StreamOptions rtOptions; | |||
@@ -1052,7 +1052,7 @@ CarlaEngine* CarlaEngine::newRtAudio(const AudioApi api) | |||
rtApi = RtAudio::LINUX_ALSA; | |||
break; | |||
case AUDIO_API_PULSEAUDIO: | |||
rtApi = RtAudio::LINUX_PULSE; | |||
rtApi = RtAudio::UNIX_PULSE; | |||
break; | |||
case AUDIO_API_COREAUDIO: | |||
rtApi = RtAudio::MACOSX_CORE; | |||
@@ -76,7 +76,7 @@ const unsigned int RtApi::SAMPLE_RATES[] = { | |||
return s; | |||
} | |||
#elif defined(__LINUX_ALSA__) || defined(__LINUX_PULSE__) || defined(__UNIX_JACK__) || defined(__LINUX_OSS__) || defined(__MACOSX_CORE__) | |||
#elif defined(__LINUX_ALSA__) || defined(__UNIX_PULSE__) || defined(__UNIX_JACK__) || defined(__LINUX_OSS__) || defined(__MACOSX_CORE__) | |||
// pthread API | |||
#define MUTEX_INITIALIZE(A) pthread_mutex_init(A, NULL) | |||
#define MUTEX_DESTROY(A) pthread_mutex_destroy(A) | |||
@@ -110,8 +110,8 @@ void RtAudio :: getCompiledApi( std::vector<RtAudio::Api> &apis ) | |||
#if defined(__LINUX_ALSA__) | |||
apis.push_back( LINUX_ALSA ); | |||
#endif | |||
#if defined(__LINUX_PULSE__) | |||
apis.push_back( LINUX_PULSE ); | |||
#if defined(__UNIX_PULSE__) | |||
apis.push_back( UNIX_PULSE ); | |||
#endif | |||
#if defined(__LINUX_OSS__) | |||
apis.push_back( LINUX_OSS ); | |||
@@ -147,8 +147,8 @@ void RtAudio :: openRtApi( RtAudio::Api api ) | |||
if ( api == LINUX_ALSA ) | |||
rtapi_ = new RtApiAlsa(); | |||
#endif | |||
#if defined(__LINUX_PULSE__) | |||
if ( api == LINUX_PULSE ) | |||
#if defined(__UNIX_PULSE__) | |||
if ( api == UNIX_PULSE ) | |||
rtapi_ = new RtApiPulse(); | |||
#endif | |||
#if defined(__LINUX_OSS__) | |||
@@ -8017,7 +8017,7 @@ static void *alsaCallbackHandler( void *ptr ) | |||
//******************** End of __LINUX_ALSA__ *********************// | |||
#endif | |||
#if defined(__LINUX_PULSE__) | |||
#if defined(__UNIX_PULSE__) | |||
// Code written by Peter Meerwald, pmeerw@pmeerw.net | |||
// and Tristan Matthews. | |||
@@ -8504,7 +8504,7 @@ bool RtApiPulse::probeDeviceOpen( unsigned int device, StreamMode mode, | |||
return FAILURE; | |||
} | |||
//******************** End of __LINUX_PULSE__ *********************// | |||
//******************** End of __UNIX_PULSE__ *********************// | |||
#endif | |||
#if defined(__LINUX_OSS__) | |||
@@ -269,8 +269,8 @@ class RTAUDIO_DLL_PUBLIC RtAudio | |||
enum Api { | |||
UNSPECIFIED, /*!< Search for a working compiled API. */ | |||
LINUX_ALSA, /*!< The Advanced Linux Sound Architecture API. */ | |||
LINUX_PULSE, /*!< The Linux PulseAudio API. */ | |||
LINUX_OSS, /*!< The Linux Open Sound System API. */ | |||
UNIX_PULSE, /*!< The PulseAudio API. */ | |||
UNIX_JACK, /*!< The Jack Low-Latency Audio Server API. */ | |||
MACOSX_CORE, /*!< Macintosh OS-X Core Audio API. */ | |||
WINDOWS_WASAPI, /*!< The Microsoft WASAPI API. */ | |||
@@ -588,7 +588,7 @@ class RTAUDIO_DLL_PUBLIC RtAudio | |||
typedef uintptr_t ThreadHandle; | |||
typedef CRITICAL_SECTION StreamMutex; | |||
#elif defined(__LINUX_ALSA__) || defined(__LINUX_PULSE__) || defined(__UNIX_JACK__) || defined(__LINUX_OSS__) || defined(__MACOSX_CORE__) | |||
#elif defined(__LINUX_ALSA__) || defined(__UNIX_PULSE__) || defined(__UNIX_JACK__) || defined(__LINUX_OSS__) || defined(__MACOSX_CORE__) | |||
// Using pthread library for various flavors of unix. | |||
#include <pthread.h> | |||
@@ -1067,13 +1067,13 @@ public: | |||
#endif | |||
#if defined(__LINUX_PULSE__) | |||
#if defined(__UNIX_PULSE__) | |||
class RtApiPulse: public RtApi | |||
{ | |||
public: | |||
~RtApiPulse(); | |||
RtAudio::Api getCurrentApi() const { return RtAudio::LINUX_PULSE; } | |||
RtAudio::Api getCurrentApi() const { return RtAudio::UNIX_PULSE; } | |||
unsigned int getDeviceCount( void ); | |||
RtAudio::DeviceInfo getDeviceInfo( unsigned int device ); | |||
void closeStream( void ); | |||