@@ -103,8 +103,6 @@ void* CarlaPluginProtectedData::uiLibSymbol(const char* const symbol) | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Settings functions, defined in CarlaPluginInternal.hpp | // Settings functions, defined in CarlaPluginInternal.hpp | ||||
// FIXME - this doesn't work!! | |||||
void CarlaPluginProtectedData::saveSetting(const unsigned int option, const bool yesNo) | void CarlaPluginProtectedData::saveSetting(const unsigned int option, const bool yesNo) | ||||
{ | { | ||||
CARLA_SAFE_ASSERT_RETURN(identifier != nullptr && identifier[0] != '\0',); | CARLA_SAFE_ASSERT_RETURN(identifier != nullptr && identifier[0] != '\0',); | ||||
@@ -490,10 +490,7 @@ public: | |||||
pData->param.createNew(params); | pData->param.createNew(params); | ||||
fParamBuffers = new float[params]; | fParamBuffers = new float[params]; | ||||
#ifdef USE_JUCE | |||||
FloatVectorOperations::clear(fParamBuffers, params); | |||||
#else | |||||
#endif | |||||
FLOAT_CLEAR(fParamBuffers, params); | |||||
} | } | ||||
const uint portNameSize(pData->engine->getMaxPortNameSize()); | const uint portNameSize(pData->engine->getMaxPortNameSize()); | ||||
@@ -626,7 +623,7 @@ public: | |||||
if (LADSPA_IS_PORT_INPUT(portType)) | if (LADSPA_IS_PORT_INPUT(portType)) | ||||
{ | { | ||||
//pData->param.data[j].hints |= PARAMETER_IS_INPUT; | |||||
pData->param.data[j].type = PARAMETER_INPUT; | |||||
pData->param.data[j].hints |= PARAMETER_IS_ENABLED; | pData->param.data[j].hints |= PARAMETER_IS_ENABLED; | ||||
pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE; | pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE; | ||||
needsCtrlIn = true; | needsCtrlIn = true; | ||||
@@ -642,8 +639,8 @@ public: | |||||
stepSmall = 1.0f; | stepSmall = 1.0f; | ||||
stepLarge = 1.0f; | stepLarge = 1.0f; | ||||
//pData->param.data[j].type = PARAMETER_LATENCY; | |||||
pData->param.data[j].hints = 0; | |||||
pData->param.data[j].type = PARAMETER_SPECIAL; | |||||
pData->param.data[j].hints = 0; // TODO PARAMETER_LATENCY | |||||
} | } | ||||
else if (std::strcmp(fDescriptor->PortNames[i], "_sample-rate") == 0) | else if (std::strcmp(fDescriptor->PortNames[i], "_sample-rate") == 0) | ||||
{ | { | ||||
@@ -652,11 +649,12 @@ public: | |||||
stepSmall = 1.0f; | stepSmall = 1.0f; | ||||
stepLarge = 1.0f; | stepLarge = 1.0f; | ||||
//pData->param.data[j].type = PARAMETER_SAMPLE_RATE; | |||||
pData->param.data[j].hints = 0; | |||||
pData->param.data[j].type = PARAMETER_SPECIAL; | |||||
pData->param.data[j].hints = 0; // TODO PARAMETER_SAMPLE_RATE | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
pData->param.data[j].type = PARAMETER_OUTPUT; | |||||
pData->param.data[j].hints |= PARAMETER_IS_ENABLED; | pData->param.data[j].hints |= PARAMETER_IS_ENABLED; | ||||
pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE; | pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE; | ||||
needsCtrlOut = true; | needsCtrlOut = true; | ||||
@@ -664,6 +662,7 @@ public: | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
pData->param.data[j].type = PARAMETER_UNKNOWN; | |||||
carla_stderr2("WARNING - Got a broken Port (Control, but not input or output)"); | carla_stderr2("WARNING - Got a broken Port (Control, but not input or output)"); | ||||
} | } | ||||
@@ -765,6 +764,7 @@ public: | |||||
{ | { | ||||
for (uint32_t i=0; i < pData->param.count; ++i) | for (uint32_t i=0; i < pData->param.count; ++i) | ||||
{ | { | ||||
// TODO | |||||
//if (pData->param.data[i].type != PARAMETER_LATENCY) | //if (pData->param.data[i].type != PARAMETER_LATENCY) | ||||
// continue; | // continue; | ||||
@@ -858,12 +858,7 @@ public: | |||||
{ | { | ||||
// disable any output sound | // disable any output sound | ||||
for (uint32_t i=0; i < pData->audioOut.count; ++i) | for (uint32_t i=0; i < pData->audioOut.count; ++i) | ||||
{ | |||||
#ifdef USE_JUCE | |||||
FloatVectorOperations::clear(outBuffer[i], frames); | |||||
#else | |||||
#endif | |||||
} | |||||
FLOAT_CLEAR(outBuffer[i], frames); | |||||
return; | return; | ||||
} | } | ||||
@@ -876,12 +871,7 @@ public: | |||||
if (pData->latency > 0) | if (pData->latency > 0) | ||||
{ | { | ||||
for (uint32_t i=0; i < pData->audioIn.count; ++i) | for (uint32_t i=0; i < pData->audioIn.count; ++i) | ||||
{ | |||||
#ifdef USE_JUCE | |||||
FloatVectorOperations::clear(pData->latencyBuffers[i], pData->latency); | |||||
#else | |||||
#endif | |||||
} | |||||
FLOAT_CLEAR(pData->latencyBuffers[i], pData->latency); | |||||
} | } | ||||
pData->needsReset = false; | pData->needsReset = false; | ||||
@@ -990,7 +980,7 @@ public: | |||||
continue; | continue; | ||||
if (pData->param.data[k].midiCC != ctrlEvent.param) | if (pData->param.data[k].midiCC != ctrlEvent.param) | ||||
continue; | continue; | ||||
if (pData->param.data[k].hints != PARAMETER_INPUT) | |||||
if (pData->param.data[k].type != PARAMETER_INPUT) | |||||
continue; | continue; | ||||
if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0) | if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0) | ||||
continue; | continue; | ||||
@@ -1113,20 +1103,10 @@ public: | |||||
// Reset audio buffers | // Reset audio buffers | ||||
for (uint32_t i=0; i < pData->audioIn.count; ++i) | for (uint32_t i=0; i < pData->audioIn.count; ++i) | ||||
{ | |||||
#ifdef USE_JUCE | |||||
FloatVectorOperations::copy(fAudioInBuffers[i], inBuffer[i]+timeOffset, frames); | |||||
#else | |||||
#endif | |||||
} | |||||
FLOAT_COPY(fAudioInBuffers[i], inBuffer[i]+timeOffset, frames); | |||||
for (uint32_t i=0; i < pData->audioOut.count; ++i) | for (uint32_t i=0; i < pData->audioOut.count; ++i) | ||||
{ | |||||
#ifdef USE_JUCE | |||||
FloatVectorOperations::clear(fAudioOutBuffers[i], frames); | |||||
#else | |||||
#endif | |||||
} | |||||
FLOAT_CLEAR(fAudioOutBuffers[i], frames); | |||||
// -------------------------------------------------------------------------------------------------------- | // -------------------------------------------------------------------------------------------------------- | ||||
// Run plugin | // Run plugin | ||||
@@ -1173,10 +1153,7 @@ public: | |||||
if (isPair) | if (isPair) | ||||
{ | { | ||||
CARLA_ASSERT(i+1 < pData->audioOut.count); | CARLA_ASSERT(i+1 < pData->audioOut.count); | ||||
#ifdef USE_JUCE | |||||
FloatVectorOperations::copy(oldBufLeft, fAudioOutBuffers[i], frames); | |||||
#else | |||||
#endif | |||||
FLOAT_COPY(oldBufLeft, fAudioOutBuffers[i], frames); | |||||
} | } | ||||
float balRangeL = (pData->postProc.balanceLeft + 1.0f)/2.0f; | float balRangeL = (pData->postProc.balanceLeft + 1.0f)/2.0f; | ||||
@@ -13,59 +13,60 @@ BUILD_CXX_FLAGS += -I../backend -I../includes -I../modules -I../utils -Wno-multi | |||||
BUILD_CXX_FLAGS += $(QTCORE_FLAGS) | BUILD_CXX_FLAGS += $(QTCORE_FLAGS) | ||||
LINK_FLAGS += $(QTCORE_LIBS) | LINK_FLAGS += $(QTCORE_LIBS) | ||||
ifeq ($(HAVE_JUCE),true) | |||||
BUILD_CXX_FLAGS += $(JUCE_CORE_FLAGS) $(JUCE_AUDIO_BASICS_FLAGS) -DHAVE_JUCE | |||||
LINK_FLAGS += $(JUCE_CORE_LIBS) $(JUCE_AUDIO_BASICS_LIBS) | |||||
endif | |||||
# ifeq ($(HAVE_JUCE),true) | |||||
# BUILD_CXX_FLAGS += -DHAVE_JUCE | |||||
# endif | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
BUILD_CXX_FLAGS += -DWANT_NATIVE | |||||
# BUILD_CXX_FLAGS += -DWANT_NATIVE | |||||
ifeq ($(CARLA_PLUGIN_SUPPORT),true) | ifeq ($(CARLA_PLUGIN_SUPPORT),true) | ||||
BUILD_CXX_FLAGS += -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST | |||||
ifeq ($(CARLA_VESTIGE_HEADER),true) | |||||
BUILD_CXX_FLAGS += -DVESTIGE_HEADER | |||||
endif | |||||
BUILD_CXX_FLAGS += -DWANT_LADSPA | |||||
# -DWANT_DSSI -DWANT_LV2 -DWANT_VST | |||||
# ifeq ($(CARLA_VESTIGE_HEADER),true) | |||||
# BUILD_CXX_FLAGS += -DVESTIGE_HEADER | |||||
# endif | |||||
endif | endif | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
ifeq ($(HAVE_CSOUND),true) | |||||
NATIVE_FLAGS += $(shell pkg-config --cflags --libs sndfile) -lcsound64 -DWANT_CSOUND | |||||
endif | |||||
ifeq ($(HAVE_FLUIDSYNTH),true) | |||||
NATIVE_FLAGS += $(shell pkg-config --cflags --libs fluidsynth) -DWANT_FLUIDSYNTH | |||||
endif | |||||
ifeq ($(HAVE_LINUXSAMPLER),true) | |||||
NATIVE_FLAGS += $(shell pkg-config --cflags --libs linuxsampler) -DWANT_LINUXSAMPLER | |||||
endif | |||||
# ifeq ($(HAVE_CSOUND),true) | |||||
# NATIVE_FLAGS += $(shell pkg-config --cflags --libs sndfile) -lcsound64 -DWANT_CSOUND | |||||
# endif | |||||
# | |||||
# ifeq ($(HAVE_FLUIDSYNTH),true) | |||||
# NATIVE_FLAGS += $(shell pkg-config --cflags --libs fluidsynth) -DWANT_FLUIDSYNTH | |||||
# endif | |||||
# | |||||
# ifeq ($(HAVE_LINUXSAMPLER),true) | |||||
# NATIVE_FLAGS += $(shell pkg-config --cflags --libs linuxsampler) -DWANT_LINUXSAMPLER | |||||
# endif | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
ifeq ($(HAVE_JUCE),true) | |||||
LIBS += ../modules/juce_audio_basics.a | |||||
LIBS_posix32 += ../modules/juce_audio_basics.posix32.a | |||||
LIBS_posix64 += ../modules/juce_audio_basics.posix64.a | |||||
LIBS_win32 += ../modules/juce_audio_basics.win32.a | |||||
LIBS_win64 += ../modules/juce_audio_basics.win64.a | |||||
LIBS += ../modules/juce_core.a | |||||
LIBS_posix32 += ../modules/juce_core.posix32.a | |||||
LIBS_posix64 += ../modules/juce_core.posix64.a | |||||
LIBS_win32 += ../modules/juce_core.win32.a | |||||
LIBS_win64 += ../modules/juce_core.win64.a | |||||
endif | |||||
ifeq ($(CARLA_PLUGIN_SUPPORT),true) | |||||
LIBS += ../modules/lilv.a | |||||
LIBS_posix32 += ../modules/lilv.posix32.a | |||||
LIBS_posix64 += ../modules/lilv.posix64.a | |||||
LIBS_win32 += ../modules/lilv.win32.a | |||||
LIBS_win64 += ../modules/lilv.win64.a | |||||
LINK_FLAGS += $(LILV_LIBS) | |||||
endif | |||||
# ifeq ($(HAVE_JUCE),true) | |||||
# LIBS += ../modules/juce_audio_basics.a | |||||
# LIBS_posix32 += ../modules/juce_audio_basics.posix32.a | |||||
# LIBS_posix64 += ../modules/juce_audio_basics.posix64.a | |||||
# LIBS_win32 += ../modules/juce_audio_basics.win32.a | |||||
# LIBS_win64 += ../modules/juce_audio_basics.win64.a | |||||
# LIBS += ../modules/juce_core.a | |||||
# LIBS_posix32 += ../modules/juce_core.posix32.a | |||||
# LIBS_posix64 += ../modules/juce_core.posix64.a | |||||
# LIBS_win32 += ../modules/juce_core.win32.a | |||||
# LIBS_win64 += ../modules/juce_core.win64.a | |||||
# LINK_FLAGS += $(JUCE_CORE_LIBS) $(JUCE_AUDIO_BASICS_LIBS) | |||||
# endif | |||||
# ifeq ($(CARLA_PLUGIN_SUPPORT),true) | |||||
# LIBS += ../modules/lilv.a | |||||
# LIBS_posix32 += ../modules/lilv.posix32.a | |||||
# LIBS_posix64 += ../modules/lilv.posix64.a | |||||
# LIBS_win32 += ../modules/lilv.win32.a | |||||
# LIBS_win64 += ../modules/lilv.win64.a | |||||
# LINK_FLAGS += $(LILV_LIBS) | |||||
# endif | |||||
POSIX_BUILD_FLAGS = $(BUILD_CXX_FLAGS) | POSIX_BUILD_FLAGS = $(BUILD_CXX_FLAGS) | ||||
POSIX_32BIT_FLAGS = $(32BIT_FLAGS) -L/usr/lib32 -L/usr/lib/i386-linux-gnu | POSIX_32BIT_FLAGS = $(32BIT_FLAGS) -L/usr/lib32 -L/usr/lib/i386-linux-gnu | ||||
@@ -66,8 +66,9 @@ CARLA_BACKEND_USE_NAMESPACE | |||||
// -------------------------------------------------------------------------- | // -------------------------------------------------------------------------- | ||||
// Dummy values to test plugins with | // Dummy values to test plugins with | ||||
const uint32_t kBufferSize = 512; | |||||
const double kSampleRate = 44100.0; | |||||
const uint32_t kBufferSize = 512; | |||||
const double kSampleRate = 44100.0; | |||||
const float kSampleRatef = 44100.0f; | |||||
// -------------------------------------------------------------------------- | // -------------------------------------------------------------------------- | ||||
// Don't print ELF/EXE related errors since discovery can find multi-architecture binaries | // Don't print ELF/EXE related errors since discovery can find multi-architecture binaries | ||||
@@ -579,9 +580,9 @@ void do_ladspa_check(void*& libHandle, const char* const filename, const bool in | |||||
if (LADSPA_IS_HINT_SAMPLE_RATE(portRangeHints.HintDescriptor)) | if (LADSPA_IS_HINT_SAMPLE_RATE(portRangeHints.HintDescriptor)) | ||||
{ | { | ||||
min *= kSampleRate; | |||||
max *= kSampleRate; | |||||
def *= kSampleRate; | |||||
min *= kSampleRatef; | |||||
max *= kSampleRatef; | |||||
def *= kSampleRatef; | |||||
} | } | ||||
if (LADSPA_IS_PORT_OUTPUT(portDescriptor) && (std::strcmp(portName, "latency") == 0 || std::strcmp(portName, "_latency") == 0)) | if (LADSPA_IS_PORT_OUTPUT(portDescriptor) && (std::strcmp(portName, "latency") == 0 || std::strcmp(portName, "_latency") == 0)) | ||||
@@ -857,9 +858,9 @@ void do_dssi_check(void*& libHandle, const char* const filename, const bool init | |||||
if (LADSPA_IS_HINT_SAMPLE_RATE(portRangeHints.HintDescriptor)) | if (LADSPA_IS_HINT_SAMPLE_RATE(portRangeHints.HintDescriptor)) | ||||
{ | { | ||||
min *= kSampleRate; | |||||
max *= kSampleRate; | |||||
def *= kSampleRate; | |||||
min *= kSampleRatef; | |||||
max *= kSampleRatef; | |||||
def *= kSampleRatef; | |||||
} | } | ||||
if (LADSPA_IS_PORT_OUTPUT(portDescriptor) && (std::strcmp(portName, "latency") == 0 || std::strcmp(portName, "_latency") == 0)) | if (LADSPA_IS_PORT_OUTPUT(portDescriptor) && (std::strcmp(portName, "latency") == 0 || std::strcmp(portName, "_latency") == 0)) | ||||