Browse Source

Force backend build once again

tags/1.9.4
falkTX 11 years ago
parent
commit
9769143e29
32 changed files with 275 additions and 445 deletions
  1. +7
    -35
      source/backend/CarlaEngine.hpp
  2. +11
    -13
      source/backend/CarlaHost.h
  3. +11
    -1
      source/backend/CarlaPlugin.hpp
  4. +21
    -79
      source/backend/engine/CarlaEngine.cpp
  5. +0
    -2
      source/backend/engine/CarlaEngineInternal.hpp
  6. +6
    -8
      source/backend/engine/CarlaEngineJack.cpp
  7. +1
    -1
      source/backend/engine/CarlaEngineOsc.hpp
  8. +10
    -10
      source/backend/engine/CarlaEngineRtAudio.cpp
  9. +1
    -1
      source/backend/engine/CarlaEngineThread.hpp
  10. +1
    -1
      source/backend/engine/Makefile
  11. +6
    -9
      source/backend/plugin/BridgePlugin.cpp
  12. +15
    -16
      source/backend/plugin/CarlaPlugin.cpp
  13. +0
    -2
      source/backend/plugin/CarlaPluginInternal.hpp
  14. +1
    -1
      source/backend/plugin/CarlaPluginThread.hpp
  15. +9
    -11
      source/backend/plugin/DssiPlugin.cpp
  16. +16
    -30
      source/backend/plugin/FluidSynthPlugin.cpp
  17. +5
    -7
      source/backend/plugin/LadspaPlugin.cpp
  18. +3
    -3
      source/backend/plugin/LinuxSamplerPlugin.cpp
  19. +27
    -31
      source/backend/plugin/Lv2Plugin.cpp
  20. +1
    -1
      source/backend/plugin/Makefile
  21. +9
    -8
      source/backend/plugin/NativePlugin.cpp
  22. +10
    -14
      source/backend/plugin/VstPlugin.cpp
  23. +3
    -3
      source/backend/standalone/CarlaStandalone.cpp
  24. +54
    -54
      source/backend/standalone/Makefile
  25. +14
    -10
      source/carla_backend.py
  26. +1
    -1
      source/modules/jackbridge/JackBridge.hpp
  27. +1
    -1
      source/modules/jackbridge/JackBridge2.cpp
  28. +1
    -1
      source/modules/ladspa_rdf.hpp
  29. +1
    -1
      source/modules/lv2_rdf.hpp
  30. +1
    -1
      source/modules/rtmidi/RtMidi.h
  31. +1
    -1
      source/tests/Makefile
  32. +27
    -88
      source/utils/CarlaBackendUtils.hpp

+ 7
- 35
source/backend/CarlaEngine.hpp View File

@@ -100,13 +100,7 @@ enum EnginePortType {
* Event port type (Control or MIDI).
** \see CarlaEngineEventPort
*/
kEnginePortTypeEvent = 3,

/*!
* OSC port type.
** \see CarlaEngineOscPort
*/
kEnginePortTypeOSC = 4
kEnginePortTypeEvent = 3
};

/*!
@@ -246,34 +240,12 @@ struct EngineOptions {
unsigned int audioBufferSize;
unsigned int audioSampleRate;
CarlaString audioDevice;
CarlaString resourceDir;

#ifndef BUILD_BRIDGE
CarlaString bridge_native;
CarlaString bridge_posix32;
CarlaString bridge_posix64;
CarlaString bridge_win32;
CarlaString bridge_win64;
#endif
#ifdef WANT_LV2
CarlaString bridge_lv2Extrn;
CarlaString bridge_lv2Gtk2;
CarlaString bridge_lv2Gtk3;
CarlaString bridge_lv2Ntk;
CarlaString bridge_lv2Qt4;
CarlaString bridge_lv2Qt5;
CarlaString bridge_lv2Cocoa;
CarlaString bridge_lv2Win;
CarlaString bridge_lv2X11;
#endif
#ifdef WANT_VST
CarlaString bridge_vstMac;
CarlaString bridge_vstHWND;
CarlaString bridge_vstX11;
#endif
CarlaString binaryDir;
CarlaString resourceDir;

EngineOptions()
#if defined(CARLA_OS_LINUX)
#ifdef CARLA_OS_LINUX
: processMode(ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS),
transportMode(ENGINE_TRANSPORT_MODE_JACK),
#else
@@ -1243,7 +1215,7 @@ public:
void oscSend_bridge_midi_program_count(const int32_t count);
void oscSend_bridge_plugin_info(const int32_t category, const int32_t hints, const char* const name, const char* const label, const char* const maker, const char* const copyright, const int64_t uniqueId);
void oscSend_bridge_parameter_info(const int32_t index, const char* const name, const char* const unit);
void oscSend_bridge_parameter_data(const int32_t index, const int32_t type, const int32_t rindex, const int32_t hints, const int32_t midiChannel, const int32_t midiCC);
void oscSend_bridge_parameter_data(const int32_t index, const int32_t rindex, const int32_t hints, const int32_t midiChannel, const int32_t midiCC);
void oscSend_bridge_parameter_ranges(const int32_t index, const float def, const float min, const float max, const float step, const float stepSmall, const float stepLarge);
void oscSend_bridge_program_info(const int32_t index, const char* const name);
void oscSend_bridge_midi_program_info(const int32_t index, const int32_t bank, const int32_t program, const char* const label);
@@ -1260,8 +1232,8 @@ public:
void oscSend_control_add_plugin_end(const int32_t pluginId);
void oscSend_control_remove_plugin(const int32_t pluginId);
void oscSend_control_set_plugin_data(const int32_t pluginId, const int32_t type, const int32_t category, const int32_t hints, const char* const realName, const char* const label, const char* const maker, const char* const copyright, const int64_t uniqueId);
void oscSend_control_set_plugin_ports(const int32_t pluginId, const int32_t audioIns, const int32_t audioOuts, const int32_t midiIns, const int32_t midiOuts, const int32_t cIns, const int32_t cOuts, const int32_t cTotals);
void oscSend_control_set_parameter_data(const int32_t pluginId, const int32_t index, const int32_t type, const int32_t hints, const char* const name, const char* const unit, const float current);
void oscSend_control_set_plugin_ports(const int32_t pluginId, const int32_t audioIns, const int32_t audioOuts, const int32_t midiIns, const int32_t midiOuts, const int32_t cIns, const int32_t cOuts);
void oscSend_control_set_parameter_data(const int32_t pluginId, const int32_t index, const int32_t hints, const char* const name, const char* const unit, const float current);
void oscSend_control_set_parameter_ranges(const int32_t pluginId, const int32_t index, const float min, const float max, const float def, const float step, const float stepSmall, const float stepLarge);
void oscSend_control_set_parameter_midi_cc(const int32_t pluginId, const int32_t index, const int32_t cc);
void oscSend_control_set_parameter_midi_channel(const int32_t pluginId, const int32_t index, const int32_t channel);


+ 11
- 13
source/backend/CarlaHost.h View File

@@ -307,19 +307,13 @@ typedef struct _CarlaPortCountInfo {
*/
uint32_t outs;

/*!
* Total number of ports.
*/
uint32_t total;

#ifdef __cplusplus
/*!
* C++ constructor.
*/
_CarlaPortCountInfo()
: ins(0),
outs(0),
total(0) {}
outs(0) {}
#endif
} CarlaPortCountInfo;

@@ -485,27 +479,31 @@ CARLA_EXPORT const char* carla_get_complete_license_text();
CARLA_EXPORT const char* carla_get_supported_file_extensions();

/*!
* Get how many engine drivers are available to use.
* Get how many engine drivers are available.
*/
CARLA_EXPORT unsigned int carla_get_engine_driver_count();

/*!
* Get the engine driver info for \a index.
* Get an engine driver name.
* @param index Driver index
*/
CARLA_EXPORT const char* carla_get_engine_driver_name(unsigned int index);

/*!
* Get the device names of the engine driver at \a index.
* Get the device names of an engine driver.
* @param index Driver index
*/
CARLA_EXPORT const char* const* carla_get_engine_driver_device_names(unsigned int index);

/*!
* Get a device driver info.
* Get information about a device driver.
* @param index Driver index
* @param name Device name
*/
CARLA_EXPORT const EngineDriverDeviceInfo* carla_get_engine_driver_device_info(unsigned int index, const char* driverName);
CARLA_EXPORT const EngineDriverDeviceInfo* carla_get_engine_driver_device_info(unsigned int index, const char* name);

/*!
* Get how many internal plugins are available to use.
* Get how many internal plugins are available.
*/
CARLA_EXPORT unsigned int carla_get_internal_plugin_count();



+ 11
- 1
source/backend/CarlaPlugin.hpp View File

@@ -30,6 +30,16 @@ struct LADSPA_RDF_Descriptor;

CARLA_BACKEND_START_NAMESPACE

/*!
* @defgroup PluginHints
* @{
*/

const unsigned int PLUGIN_NEEDS_FIXED_BUFFERS = 0x100;
const unsigned int PLUGIN_NEEDS_SINGLE_THREAD = 0x200;

/** @} */

/*!
* @defgroup CarlaPluginAPI Carla Plugin API
*
@@ -378,7 +388,7 @@ public:
*
* \see getParameterCount()
*/
void getParameterCountInfo(uint32_t& ins, uint32_t& outs, uint32_t& total) const;
void getParameterCountInfo(uint32_t& ins, uint32_t& outs) const noexcept;

// -------------------------------------------------------------------
// Set data (state)


+ 21
- 79
source/backend/engine/CarlaEngine.cpp View File

@@ -328,8 +328,6 @@ CarlaEnginePort* CarlaEngineClient::addPort(const EnginePortType portType, const
return new CarlaEngineCVPort(fEngine, isInput);
case kEnginePortTypeEvent:
return new CarlaEngineEventPort(fEngine, isInput);
case kEnginePortTypeOSC:
return nullptr; //new CarlaEngineOscPort(fEngine, isInput);
}

carla_stderr("CarlaEngineClient::addPort(%i, \"%s\", %s) - invalid type", portType, name, bool2str(isInput));
@@ -403,7 +401,7 @@ const char* const* CarlaEngine::getDriverDeviceNames(const unsigned int index)
{
carla_debug("CarlaEngine::getDriverDeviceNames(%i)", index);

if (index == 0)
if (index == 0) // JACK
{
static const char* ret[3] = { "Auto-Connect OFF", "Auto-Connect ON", nullptr };
return ret;
@@ -431,12 +429,13 @@ const EngineDriverDeviceInfo* CarlaEngine::getDriverDeviceInfo(const unsigned in
{
carla_debug("CarlaEngine::getDriverDeviceInfo(%i, \"%s\")", index, deviceName);

if (index == 0)
if (index == 0) // JACK
{
static uint32_t bufSizes[11] = { 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 0 };
static EngineDriverDeviceInfo devInfo;
devInfo.hints |= ENGINE_DRIVER_VARIABLE_BUFFER_SIZE;
devInfo.hints = ENGINE_DRIVER_DEVICE_VARIABLE_BUFFER_SIZE;
devInfo.bufferSizes = bufSizes;
devInfo.sampleRates = nullptr;
return &devInfo;
}

@@ -639,7 +638,7 @@ void CarlaEngine::idle()
CarlaPlugin* const plugin(pData->plugins[i].plugin);

if (plugin != nullptr && plugin->isEnabled())
plugin->idleGui();
plugin->idle();
}
}

@@ -696,7 +695,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, cons

CarlaPlugin* plugin = nullptr;

#ifndef BUILD_BRIDGE
#if 0 //ndef BUILD_BRIDGE
const char* bridgeBinary;

switch (btype)
@@ -720,7 +719,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, cons

# ifndef CARLA_OS_WIN
if (btype == BINARY_NATIVE && fOptions.bridge_native.isNotEmpty())
bridgeBinary = (const char*)fOptions.bridge_native;
bridgeBinary = (const char*)fOptions.bridge_native;
# endif

if (btype != BINARY_NATIVE || (fOptions.preferPluginBridges && bridgeBinary != nullptr))
@@ -1487,7 +1486,7 @@ void CarlaEngine::setOption(const EngineOption option, const int value, const ch

switch (option)
{
case ENGINE_OPTION_PROCESS_NAME:
case ENGINE_OPTION_DEBUG:
break;

case ENGINE_OPTION_PROCESS_MODE:
@@ -1559,69 +1558,13 @@ void CarlaEngine::setOption(const EngineOption option, const int value, const ch
fOptions.audioDevice = valueStr;
break;

case ENGINE_OPTION_PATH_RESOURCES:
fOptions.resourceDir = valueStr;
case ENGINE_OPTION_PATH_BINARIES:
fOptions.binaryDir = valueStr;
break;

#ifndef BUILD_BRIDGE
case ENGINE_OPTION_PATH_BRIDGE_NATIVE:
fOptions.bridge_native = valueStr;
break;
case ENGINE_OPTION_PATH_BRIDGE_POSIX32:
fOptions.bridge_posix32 = valueStr;
break;
case ENGINE_OPTION_PATH_BRIDGE_POSIX64:
fOptions.bridge_posix64 = valueStr;
break;
case ENGINE_OPTION_PATH_BRIDGE_WIN32:
fOptions.bridge_win32 = valueStr;
break;
case ENGINE_OPTION_PATH_BRIDGE_WIN64:
fOptions.bridge_win64 = valueStr;
break;
#endif

#ifdef WANT_LV2
case ENGINE_OPTION_PATH_BRIDGE_LV2_EXTERNAL:
fOptions.bridge_lv2Extrn = valueStr;
break;
case ENGINE_OPTION_PATH_BRIDGE_LV2_GTK2:
fOptions.bridge_lv2Gtk2 = valueStr;
break;
case ENGINE_OPTION_PATH_BRIDGE_LV2_GTK3:
fOptions.bridge_lv2Gtk3 = valueStr;
break;
case ENGINE_OPTION_PATH_BRIDGE_LV2_NTK:
fOptions.bridge_lv2Ntk = valueStr;
break;
case ENGINE_OPTION_PATH_BRIDGE_LV2_QT4:
fOptions.bridge_lv2Qt4 = valueStr;
break;
case ENGINE_OPTION_PATH_BRIDGE_LV2_QT5:
fOptions.bridge_lv2Qt5 = valueStr;
break;
case ENGINE_OPTION_PATH_BRIDGE_LV2_COCOA:
fOptions.bridge_lv2Cocoa = valueStr;
break;
case ENGINE_OPTION_PATH_BRIDGE_LV2_WINDOWS:
fOptions.bridge_lv2Win = valueStr;
break;
case ENGINE_OPTION_PATH_BRIDGE_LV2_X11:
fOptions.bridge_lv2X11 = valueStr;
break;
#endif

#ifdef WANT_VST
case ENGINE_OPTION_PATH_BRIDGE_VST_MAC:
fOptions.bridge_vstMac = valueStr;
break;
case ENGINE_OPTION_PATH_BRIDGE_VST_HWND:
fOptions.bridge_vstHWND = valueStr;
break;
case ENGINE_OPTION_PATH_BRIDGE_VST_X11:
fOptions.bridge_vstX11 = valueStr;
case ENGINE_OPTION_PATH_RESOURCES:
fOptions.resourceDir = valueStr;
break;
#endif
}
}

@@ -1963,37 +1906,36 @@ void CarlaEngine::oscSend_control_set_plugin_data(const int32_t pluginId, const
}
}

void CarlaEngine::oscSend_control_set_plugin_ports(const int32_t pluginId, const int32_t audioIns, const int32_t audioOuts, const int32_t midiIns, const int32_t midiOuts, const int32_t cIns, const int32_t cOuts, const int32_t cTotals)
void CarlaEngine::oscSend_control_set_plugin_ports(const int32_t pluginId, const int32_t audioIns, const int32_t audioOuts, const int32_t midiIns, const int32_t midiOuts, const int32_t cIns, const int32_t cOuts)
{
CARLA_SAFE_ASSERT_RETURN(pData->oscData != nullptr,);
CARLA_SAFE_ASSERT_RETURN(pluginId >= 0 && pluginId < static_cast<int32_t>(pData->maxPluginNumber),);
carla_debug("CarlaEngine::oscSend_control_set_plugin_ports(%i, %i, %i, %i, %i, %i, %i, %i)", pluginId, audioIns, audioOuts, midiIns, midiOuts, cIns, cOuts, cTotals);
carla_debug("CarlaEngine::oscSend_control_set_plugin_ports(%i, %i, %i, %i, %i, %i, %i)", pluginId, audioIns, audioOuts, midiIns, midiOuts, cIns, cOuts);

if (pData->oscData->target != nullptr)
{
char targetPath[std::strlen(pData->oscData->path)+18];
std::strcpy(targetPath, pData->oscData->path);
std::strcat(targetPath, "/set_plugin_ports");
lo_send(pData->oscData->target, targetPath, "iiiiiiii", pluginId, audioIns, audioOuts, midiIns, midiOuts, cIns, cOuts, cTotals);
lo_send(pData->oscData->target, targetPath, "iiiiiii", pluginId, audioIns, audioOuts, midiIns, midiOuts, cIns, cOuts);
}
}

void CarlaEngine::oscSend_control_set_parameter_data(const int32_t pluginId, const int32_t index, const int32_t type, const int32_t hints, const char* const name, const char* const unit, const float current)
void CarlaEngine::oscSend_control_set_parameter_data(const int32_t pluginId, const int32_t index, const int32_t hints, const char* const name, const char* const unit, const float current)
{
CARLA_SAFE_ASSERT_RETURN(pData->oscData != nullptr,);
CARLA_SAFE_ASSERT_RETURN(pluginId >= 0 && pluginId < static_cast<int32_t>(pData->maxPluginNumber),);
CARLA_SAFE_ASSERT_RETURN(index >= 0,);
CARLA_SAFE_ASSERT_RETURN(type != PARAMETER_UNKNOWN,);
CARLA_SAFE_ASSERT_RETURN(name != nullptr && name[0] != '\0',);
CARLA_SAFE_ASSERT_RETURN(unit != nullptr,);
carla_debug("CarlaEngine::oscSend_control_set_parameter_data(%i, %i, %i, %i, \"%s\", \"%s\", %f)", pluginId, index, type, hints, name, unit, current);
carla_debug("CarlaEngine::oscSend_control_set_parameter_data(%i, %i, %i, %i, \"%s\", \"%s\", %f)", pluginId, index, hints, name, unit, current);

if (pData->oscData->target != nullptr)
{
char targetPath[std::strlen(pData->oscData->path)+20];
std::strcpy(targetPath, pData->oscData->path);
std::strcat(targetPath, "/set_parameter_data");
lo_send(pData->oscData->target, targetPath, "iiiissf", pluginId, index, type, hints, name, unit, current);
lo_send(pData->oscData->target, targetPath, "iiissf", pluginId, index, hints, name, unit, current);
}
}

@@ -2350,17 +2292,17 @@ void CarlaEngine::oscSend_bridge_parameter_info(const int32_t index, const char*
}
}

void CarlaEngine::oscSend_bridge_parameter_data(const int32_t index, const int32_t type, const int32_t rindex, const int32_t hints, const int32_t midiChannel, const int32_t midiCC)
void CarlaEngine::oscSend_bridge_parameter_data(const int32_t index, const int32_t rindex, const int32_t hints, const int32_t midiChannel, const int32_t midiCC)
{
CARLA_SAFE_ASSERT_RETURN(pData->oscData != nullptr,);
carla_debug("CarlaEngine::oscSend_bridge_parameter_data(%i, %i, %i, %i, %i, %i)", index, type, rindex, hints, midiChannel, midiCC);
carla_debug("CarlaEngine::oscSend_bridge_parameter_data(%i, %i, %i, %i, %i)", index, rindex, hints, midiChannel, midiCC);

if (pData->oscData->target != nullptr)
{
char targetPath[std::strlen(pData->oscData->path)+23];
std::strcpy(targetPath, pData->oscData->path);
std::strcat(targetPath, "/bridge_parameter_data");
lo_send(pData->oscData->target, targetPath, "iiiiii", index, type, rindex, hints, midiChannel, midiCC);
lo_send(pData->oscData->target, targetPath, "iiiii", index, rindex, hints, midiChannel, midiCC);
}
}



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

@@ -70,8 +70,6 @@ const char* EnginePortType2Str(const EnginePortType type)
return "kEnginePortTypeCV";
case kEnginePortTypeEvent:
return "kEnginePortTypeEvent";
case kEnginePortTypeOSC:
return "kEnginePortTypeOSC";
}

carla_stderr("CarlaBackend::EnginePortType2Str(%i) - invalid type", type);


+ 6
- 8
source/backend/engine/CarlaEngineJack.cpp View File

@@ -528,8 +528,6 @@ public:
case kEnginePortTypeEvent:
port = jackbridge_port_register(fClient, name, JACK_DEFAULT_MIDI_TYPE, isInput ? JackPortIsInput : JackPortIsOutput, 0);
break;
case kEnginePortTypeOSC:
break;
}
}

@@ -544,8 +542,6 @@ public:
return new CarlaEngineJackCVPort(fEngine, isInput, fClient, port);
case kEnginePortTypeEvent:
return new CarlaEngineJackEventPort(fEngine, isInput, fClient, port);
case kEnginePortTypeOSC:
break;
}

carla_stderr("CarlaEngineJackClient::addPort(%s, \"%s\", %s) - invalid type", EnginePortType2Str(portType), name, bool2str(isInput));
@@ -816,7 +812,7 @@ public:
const char* const icon((const char*)data);
CARLA_ASSERT(std::strlen(icon)+1 == dataSize);

callback(ENGINE_CALLBACK_PATCHBAY_ICON_CHANGED, 0, groupId, 0, 0.0f, icon);
callback(ENGINE_CALLBACK_PATCHBAY_CLIENT_ICON_CHANGED, 0, groupId, 0, 0.0f, icon);

jackbridge_free(data);
}
@@ -1175,6 +1171,8 @@ protected:
FloatVectorOperations::copy(audioOut1, audioIn1, nframes);
FloatVectorOperations::copy(audioOut2, audioIn2, nframes);
#else
carla_copyFloat(audioOut1, audioIn1, nframes);
carla_copyFloat(audioOut2, audioIn2, nframes);
#endif
jackbridge_midi_clear_buffer(eventOut);
}
@@ -1506,11 +1504,11 @@ protected:
bool portIsCV = (jackPortFlags & JackPortIsControlVoltage);

unsigned int canvasPortFlags = 0x0;
canvasPortFlags |= portIsInput ? PATCHBAY_PORT_IS_INPUT : PATCHBAY_PORT_IS_OUTPUT;
canvasPortFlags |= portIsAudio ? PATCHBAY_PORT_IS_AUDIO : PATCHBAY_PORT_IS_MIDI;
canvasPortFlags |= portIsInput ? PATCHBAY_PORT_IS_INPUT : 0x0;
canvasPortFlags |= portIsAudio ? PATCHBAY_PORT_TYPE_AUDIO : PATCHBAY_PORT_TYPE_MIDI;

if (portIsAudio && portIsCV)
canvasPortFlags |= PATCHBAY_PORT_IS_CV;
canvasPortFlags |= PATCHBAY_PORT_TYPE_CV;

PortNameToId portNameToId(groupId, fLastPortId++, portName, fullPortName);
fUsedPortNames.append(portNameToId);


+ 1
- 1
source/backend/engine/CarlaEngineOsc.hpp View File

@@ -18,7 +18,7 @@
#ifndef CARLA_ENGINE_OSC_HPP_INCLUDED
#define CARLA_ENGINE_OSC_HPP_INCLUDED

#include "CarlaBackend.hpp"
#include "CarlaBackend.h"
#include "CarlaOscUtils.hpp"
#include "CarlaString.hpp"



+ 10
- 10
source/backend/engine/CarlaEngineRtAudio.cpp View File

@@ -657,12 +657,12 @@ public:
{
callback(ENGINE_CALLBACK_PATCHBAY_CLIENT_ADDED, 0, PATCHBAY_GROUP_CARLA, 0, 0.0f, getName());

callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_AUDIO_IN1, PATCHBAY_PORT_IS_AUDIO|PATCHBAY_PORT_IS_INPUT, "audio-in1");
callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_AUDIO_IN2, PATCHBAY_PORT_IS_AUDIO|PATCHBAY_PORT_IS_INPUT, "audio-in2");
callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_AUDIO_OUT1, PATCHBAY_PORT_IS_AUDIO|PATCHBAY_PORT_IS_OUTPUT, "audio-out1");
callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_AUDIO_OUT2, PATCHBAY_PORT_IS_AUDIO|PATCHBAY_PORT_IS_OUTPUT, "audio-out2");
callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_MIDI_IN, PATCHBAY_PORT_IS_MIDI|PATCHBAY_PORT_IS_INPUT, "midi-in");
callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_MIDI_OUT, PATCHBAY_PORT_IS_MIDI|PATCHBAY_PORT_IS_OUTPUT, "midi-out");
callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_AUDIO_IN1, PATCHBAY_PORT_TYPE_AUDIO|PATCHBAY_PORT_IS_INPUT, "audio-in1");
callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_AUDIO_IN2, PATCHBAY_PORT_TYPE_AUDIO|PATCHBAY_PORT_IS_INPUT, "audio-in2");
callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_AUDIO_OUT1, PATCHBAY_PORT_TYPE_AUDIO, "audio-out1");
callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_AUDIO_OUT2, PATCHBAY_PORT_TYPE_AUDIO, "audio-out2");
callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_MIDI_IN, PATCHBAY_PORT_TYPE_MIDI|PATCHBAY_PORT_IS_INPUT, "midi-in");
callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_MIDI_OUT, PATCHBAY_PORT_TYPE_MIDI, "midi-out");
}

// Audio In
@@ -677,7 +677,7 @@ public:
for (unsigned int i=0; i < fAudioCountIn; ++i)
{
std::snprintf(strBuf, STR_MAX, "capture_%i", i+1);
callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_AUDIO_IN, PATCHBAY_GROUP_AUDIO_IN*1000 + i, PATCHBAY_PORT_IS_AUDIO|PATCHBAY_PORT_IS_OUTPUT, strBuf);
callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_AUDIO_IN, PATCHBAY_GROUP_AUDIO_IN*1000 + i, PATCHBAY_PORT_TYPE_AUDIO, strBuf);
}
}

@@ -693,7 +693,7 @@ public:
for (unsigned int i=0; i < fAudioCountOut; ++i)
{
std::snprintf(strBuf, STR_MAX, "playback_%i", i+1);
callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_AUDIO_OUT, PATCHBAY_GROUP_AUDIO_OUT*1000 + i, PATCHBAY_PORT_IS_AUDIO|PATCHBAY_PORT_IS_INPUT, strBuf);
callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_AUDIO_OUT, PATCHBAY_GROUP_AUDIO_OUT*1000 + i, PATCHBAY_PORT_TYPE_AUDIO|PATCHBAY_PORT_IS_INPUT, strBuf);
}
}

@@ -708,7 +708,7 @@ public:
std::strncpy(portNameToId.name, fDummyMidiIn.getPortName(i).c_str(), STR_MAX);
fUsedMidiIns.append(portNameToId);

callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_MIDI_IN, portNameToId.portId, PATCHBAY_PORT_IS_MIDI|PATCHBAY_PORT_IS_OUTPUT, portNameToId.name);
callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_MIDI_IN, portNameToId.portId, PATCHBAY_PORT_TYPE_MIDI, portNameToId.name);
}
}

@@ -724,7 +724,7 @@ public:
std::strncpy(portNameToId.name, fDummyMidiOut.getPortName(i).c_str(), STR_MAX);
fUsedMidiOuts.append(portNameToId);

callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_MIDI_OUT, portNameToId.portId, PATCHBAY_PORT_IS_MIDI|PATCHBAY_PORT_IS_INPUT, portNameToId.name);
callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_MIDI_OUT, portNameToId.portId, PATCHBAY_PORT_TYPE_MIDI|PATCHBAY_PORT_IS_INPUT, portNameToId.name);
}
}
#endif


+ 1
- 1
source/backend/engine/CarlaEngineThread.hpp View File

@@ -18,7 +18,7 @@
#ifndef CARLA_ENGINE_THREAD_HPP_INCLUDED
#define CARLA_ENGINE_THREAD_HPP_INCLUDED

#include "CarlaBackend.hpp"
#include "CarlaBackend.h"
#include "CarlaThread.hpp"

CARLA_BACKEND_START_NAMESPACE


+ 1
- 1
source/backend/engine/Makefile View File

@@ -30,7 +30,7 @@ OBJS = $(OBJSp) \
# CarlaEngineJuce.cpp.o

HEADERS = \
../CarlaBackend.hpp ../CarlaEngine.hpp ../CarlaPlugin.hpp \
../CarlaBackend.h ../CarlaEngine.hpp ../CarlaPlugin.hpp \
CarlaEngineInternal.hpp CarlaEngineOsc.hpp CarlaEngineThread.hpp

TARGET = ../libcarla_engine.a


+ 6
- 9
source/backend/plugin/BridgePlugin.cpp View File

@@ -365,7 +365,7 @@ public:
// -------------------------------------------------------------------
// Information (per-plugin data)

unsigned int getAvailableOptions() const override
unsigned int getOptionsAvailable() const override
{
unsigned int options = 0x0;

@@ -578,7 +578,7 @@ public:
// -------------------------------------------------------------------
// Set gui stuff

void showGui(const bool yesNo) override
void showCustomUI(const bool yesNo) override
{
if (yesNo)
osc_send_show(pData->osc.data);
@@ -586,12 +586,12 @@ public:
osc_send_hide(pData->osc.data);
}

void idleGui() override
void idle() override
{
if (! pData->osc.thread.isRunning())
carla_stderr2("TESTING: Bridge has closed!");

CarlaPlugin::idleGui();
CarlaPlugin::idle();
}

// -------------------------------------------------------------------
@@ -891,7 +891,7 @@ public:
continue;
if (pData->param.data[k].midiCC != ctrlEvent.param)
continue;
if (pData->param.data[k].type != PARAMETER_INPUT)
if ((pData->param.data[k].hints & PARAMETER_IS_INPUT) == 0)
continue;
if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0)
continue;
@@ -1389,17 +1389,15 @@ public:

case kPluginBridgeParameterData:
{
CARLA_BRIDGE_CHECK_OSC_TYPES(6, "iiiiii");
CARLA_BRIDGE_CHECK_OSC_TYPES(5, "iiiii");

const int32_t index = argv[0]->i;
const int32_t type = argv[1]->i;
const int32_t rindex = argv[2]->i;
const int32_t hints = argv[3]->i;
const int32_t channel = argv[4]->i;
const int32_t cc = argv[5]->i;

CARLA_ASSERT_INT2(index >= 0 && index < static_cast<int32_t>(pData->param.count), index, pData->param.count);
CARLA_ASSERT(type >= 0);
CARLA_ASSERT(rindex >= 0);
CARLA_ASSERT(hints >= 0);
CARLA_ASSERT(channel >= 0 && channel < 16);
@@ -1407,7 +1405,6 @@ public:

if (index >= 0 && static_cast<int32_t>(pData->param.count))
{
pData->param.data[index].type = static_cast<ParameterType>(type);
pData->param.data[index].index = index;
pData->param.data[index].rindex = rindex;
pData->param.data[index].hints = hints;


+ 15
- 16
source/backend/plugin/CarlaPlugin.cpp View File

@@ -349,7 +349,7 @@ const ParameterRanges& CarlaPlugin::getParameterRanges(const uint32_t parameterI
bool CarlaPlugin::isParameterOutput(const uint32_t parameterId) const
{
CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, false);
return (pData->param.data[parameterId].type == PARAMETER_OUTPUT);
return ((pData->param.data[parameterId].hints & PARAMETER_IS_INPUT) == 0);
}

const MidiProgramData& CarlaPlugin::getMidiProgramData(const uint32_t index) const
@@ -374,7 +374,7 @@ int32_t CarlaPlugin::getChunkData(void** const dataPtr) const
// -------------------------------------------------------------------
// Information (per-plugin data)

unsigned int CarlaPlugin::getAvailableOptions() const
unsigned int CarlaPlugin::getOptionsAvailable() const
{
CARLA_ASSERT(false); // this should never happen
return 0x0;
@@ -463,17 +463,16 @@ void CarlaPlugin::getMidiProgramName(const uint32_t index, char* const strBuf) c
std::strncpy(strBuf, pData->midiprog.data[index].name, STR_MAX);
}

void CarlaPlugin::getParameterCountInfo(uint32_t& ins, uint32_t& outs, uint32_t& total) const
void CarlaPlugin::getParameterCountInfo(uint32_t& ins, uint32_t& outs) const noexcept
{
ins = 0;
outs = 0;
total = pData->param.count;

for (uint32_t i=0; i < pData->param.count; ++i)
{
if (pData->param.data[i].type == PARAMETER_INPUT)
if (pData->param.data[i].hints & PARAMETER_IS_INPUT)
++ins;
else if (pData->param.data[i].type == PARAMETER_OUTPUT)
else
++outs;
}
}
@@ -566,7 +565,7 @@ const SaveState& CarlaPlugin::getSaveState()
{
const ParameterData& paramData(pData->param.data[i]);

if (paramData.type != PARAMETER_INPUT || (paramData.hints & PARAMETER_IS_ENABLED) == 0)
if ((paramData.hints & PARAMETER_IS_INPUT) == 0 || (paramData.hints & PARAMETER_IS_ENABLED) == 0)
continue;

StateParameter* stateParameter(new StateParameter());
@@ -897,7 +896,7 @@ void CarlaPlugin::setName(const char* const newName)

void CarlaPlugin::setOption(const unsigned int option, const bool yesNo)
{
CARLA_ASSERT(getAvailableOptions() & option);
CARLA_ASSERT(getOptionsAvailable() & option);

if (yesNo)
fOptions |= option;
@@ -1424,7 +1423,7 @@ void CarlaPlugin::setMidiProgramById(const uint32_t bank, const uint32_t program
// -------------------------------------------------------------------
// Set gui stuff

void CarlaPlugin::showGui(const bool yesNo)
void CarlaPlugin::showCustomUI(const bool yesNo)
{
CARLA_ASSERT(false);
return;
@@ -1433,7 +1432,7 @@ void CarlaPlugin::showGui(const bool yesNo)
(void)yesNo;
}

void CarlaPlugin::idleGui()
void CarlaPlugin::idle()
{
if (! fEnabled)
return;
@@ -1446,7 +1445,7 @@ void CarlaPlugin::idleGui()
// Update parameter outputs
for (uint32_t i=0; i < pData->param.count; ++i)
{
if (pData->param.data[i].type == PARAMETER_OUTPUT)
if ((pData->param.data[i].hints & PARAMETER_IS_INPUT) == 0)
uiParameterChange(i, getParameterValue(i));
}
}
@@ -1546,15 +1545,15 @@ void CarlaPlugin::registerToOscClient()

// Base count
{
uint32_t cIns, cOuts, cTotals;
getParameterCountInfo(cIns, cOuts, cTotals);
uint32_t cIns, cOuts;
getParameterCountInfo(cIns, cOuts);

#ifdef BUILD_BRIDGE
pData->engine->oscSend_bridge_audio_count(getAudioInCount(), getAudioOutCount(), getAudioInCount() + getAudioOutCount());
pData->engine->oscSend_bridge_midi_count(getMidiInCount(), getMidiOutCount(), getMidiInCount() + getMidiOutCount());
pData->engine->oscSend_bridge_parameter_count(cIns, cOuts, cTotals);
#else
pData->engine->oscSend_control_set_plugin_ports(fId, getAudioInCount(), getAudioOutCount(), getMidiInCount(), getMidiOutCount(), cIns, cOuts, cTotals);
pData->engine->oscSend_control_set_plugin_ports(fId, getAudioInCount(), getAudioOutCount(), getMidiInCount(), getMidiOutCount(), cIns, cOuts);
#endif
}

@@ -1576,11 +1575,11 @@ void CarlaPlugin::registerToOscClient()

#ifdef BUILD_BRIDGE
pData->engine->oscSend_bridge_parameter_info(i, bufName, bufUnit);
pData->engine->oscSend_bridge_parameter_data(i, paramData.type, paramData.rindex, paramData.hints, paramData.midiChannel, paramData.midiCC);
pData->engine->oscSend_bridge_parameter_data(i, paramData.rindex, paramData.hints, paramData.midiChannel, paramData.midiCC);
pData->engine->oscSend_bridge_parameter_ranges(i, paramRanges.def, paramRanges.min, paramRanges.max, paramRanges.step, paramRanges.stepSmall, paramRanges.stepLarge);
pData->engine->oscSend_bridge_set_parameter_value(i, getParameterValue(i));
#else
pData->engine->oscSend_control_set_parameter_data(fId, i, paramData.type, paramData.hints, bufName, bufUnit, getParameterValue(i));
pData->engine->oscSend_control_set_parameter_data(fId, i,paramData.hints, bufName, bufUnit, getParameterValue(i));
pData->engine->oscSend_control_set_parameter_ranges(fId, i, paramRanges.min, paramRanges.max, paramRanges.def, paramRanges.step, paramRanges.stepSmall, paramRanges.stepLarge);
pData->engine->oscSend_control_set_parameter_midi_cc(fId, i, paramData.midiCC);
pData->engine->oscSend_control_set_parameter_midi_channel(fId, i, paramData.midiChannel);


+ 0
- 2
source/backend/plugin/CarlaPluginInternal.hpp View File

@@ -51,8 +51,6 @@ const unsigned short kPluginMaxMidiEvents = 512;
const unsigned int PLUGIN_EXTRA_HINT_HAS_MIDI_IN = 0x01;
const unsigned int PLUGIN_EXTRA_HINT_HAS_MIDI_OUT = 0x02;
const unsigned int PLUGIN_EXTRA_HINT_CAN_RUN_RACK = 0x04;
const unsigned int PLUGIN_EXTRA_HINT_FIXED_BUFFERS = 0x10;
const unsigned int PLUGIN_EXTRA_HINT_SINGLE_THREAD = 0x20;

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



+ 1
- 1
source/backend/plugin/CarlaPluginThread.hpp View File

@@ -18,7 +18,7 @@
#ifndef CARLA_PLUGIN_THREAD_HPP_INCLUDED
#define CARLA_PLUGIN_THREAD_HPP_INCLUDED

#include "CarlaBackend.hpp"
#include "CarlaBackend.h"
#include "CarlaThread.hpp"

CARLA_BACKEND_START_NAMESPACE


+ 9
- 11
source/backend/plugin/DssiPlugin.cpp View File

@@ -53,9 +53,9 @@ public:
carla_debug("DssiPlugin::~DssiPlugin()");

// close UI
if (fHints & PLUGIN_HAS_GUI)
if (fHints & PLUGIN_HAS_CUSTOM_UI)
{
showGui(false);
showCustomUI(false);

pData->osc.thread.stop(pData->engine->getOptions().uiBridgesTimeout * 2);
}
@@ -154,7 +154,7 @@ public:
// -------------------------------------------------------------------
// Information (per-plugin data)

unsigned int getAvailableOptions() const override
unsigned int getOptionsAvailable() const override
{
const bool isAmSynth = fFilename.contains("amsynth", true);
const bool isDssiVst = fFilename.contains("dssi-vst", true);
@@ -358,7 +358,7 @@ public:
// -------------------------------------------------------------------
// Set gui stuff

void showGui(const bool yesNo) override
void showCustomUI(const bool yesNo) override
{
if (yesNo)
{
@@ -615,7 +615,7 @@ public:

if (LADSPA_IS_PORT_INPUT(portType))
{
pData->param.data[j].type = PARAMETER_INPUT;
pData->param.data[j].hints |= PARAMETER_IS_INPUT;
pData->param.data[j].hints |= PARAMETER_IS_ENABLED;
pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE;
needsCtrlIn = true;
@@ -658,7 +658,6 @@ public:
}
else
{
pData->param.data[j].type = PARAMETER_OUTPUT;
pData->param.data[j].hints |= PARAMETER_IS_ENABLED;
pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE;
needsCtrlOut = true;
@@ -666,7 +665,6 @@ public:
}
else
{
pData->param.data[j].type = PARAMETER_UNKNOWN;
carla_stderr2("WARNING - Got a broken Port (Control, but not input or output)");
}

@@ -745,7 +743,7 @@ public:
fHints |= PLUGIN_IS_RTSAFE;

if (fGuiFilename != nullptr)
fHints |= PLUGIN_HAS_GUI;
fHints |= PLUGIN_HAS_CUSTOM_UI;

if (aOuts > 0 && (aIns == aOuts || aIns == 1))
fHints |= PLUGIN_CAN_DRYWET;
@@ -1163,7 +1161,7 @@ public:
continue;
if (pData->param.data[k].midiCC != ctrlEvent.param)
continue;
if (pData->param.data[k].type != PARAMETER_INPUT)
if ((pData->param.data[k].hints & PARAMETER_IS_INPUT) == 0)
continue;
if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0)
continue;
@@ -1411,7 +1409,7 @@ public:

for (uint32_t k=0; k < pData->param.count; ++k)
{
if (pData->param.data[k].type != PARAMETER_OUTPUT)
if (pData->param.data[k].hints & PARAMETER_IS_INPUT)
continue;

if (pData->param.data[k].midiCC > 0)
@@ -1954,7 +1952,7 @@ public:
pData->idStr += std::strrchr(filename, OS_SEP)+1;
pData->idStr += "/";
pData->idStr += label;
fOptions = pData->loadSettings(fOptions, getAvailableOptions());
fOptions = pData->loadSettings(fOptions, getOptionsAvailable());

// ignore settings, we need this anyway
if (isAmSynth || isDssiVst)


+ 16
- 30
source/backend/plugin/FluidSynthPlugin.cpp View File

@@ -156,7 +156,7 @@ public:
// -------------------------------------------------------------------
// Information (per-plugin data)

unsigned int getAvailableOptions() const override
unsigned int getOptionsAvailable() const override
{
unsigned int options = 0x0;

@@ -644,8 +644,7 @@ public:
j = FluidSynthReverbOnOff;
pData->param.data[j].index = j;
pData->param.data[j].rindex = j;
pData->param.data[j].type = PARAMETER_INPUT;
pData->param.data[j].hints = PARAMETER_IS_ENABLED /*| PARAMETER_IS_AUTOMABLE*/ | PARAMETER_IS_BOOLEAN;
pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED /*| PARAMETER_IS_AUTOMABLE*/ | PARAMETER_IS_BOOLEAN;
pData->param.data[j].midiChannel = 0;
pData->param.data[j].midiCC = -1;
pData->param.ranges[j].min = 0.0f;
@@ -660,8 +659,7 @@ public:
j = FluidSynthReverbRoomSize;
pData->param.data[j].index = j;
pData->param.data[j].rindex = j;
pData->param.data[j].type = PARAMETER_INPUT;
pData->param.data[j].hints = PARAMETER_IS_ENABLED /*| PARAMETER_IS_AUTOMABLE*/;
pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED /*| PARAMETER_IS_AUTOMABLE*/;
pData->param.data[j].midiChannel = 0;
pData->param.data[j].midiCC = -1;
pData->param.ranges[j].min = 0.0f;
@@ -676,8 +674,7 @@ public:
j = FluidSynthReverbDamp;
pData->param.data[j].index = j;
pData->param.data[j].rindex = j;
pData->param.data[j].type = PARAMETER_INPUT;
pData->param.data[j].hints = PARAMETER_IS_ENABLED /*| PARAMETER_IS_AUTOMABLE*/;
pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED /*| PARAMETER_IS_AUTOMABLE*/;
pData->param.data[j].midiChannel = 0;
pData->param.data[j].midiCC = -1;
pData->param.ranges[j].min = 0.0f;
@@ -692,8 +689,7 @@ public:
j = FluidSynthReverbLevel;
pData->param.data[j].index = j;
pData->param.data[j].rindex = j;
pData->param.data[j].type = PARAMETER_INPUT;
pData->param.data[j].hints = PARAMETER_IS_ENABLED /*| PARAMETER_IS_AUTOMABLE*/;
pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED /*| PARAMETER_IS_AUTOMABLE*/;
pData->param.data[j].midiChannel = 0;
pData->param.data[j].midiCC = MIDI_CONTROL_REVERB_SEND_LEVEL;
pData->param.ranges[j].min = 0.0f;
@@ -708,8 +704,7 @@ public:
j = FluidSynthReverbWidth;
pData->param.data[j].index = j;
pData->param.data[j].rindex = j;
pData->param.data[j].type = PARAMETER_INPUT;
pData->param.data[j].hints = PARAMETER_IS_ENABLED /*| PARAMETER_IS_AUTOMABLE*/;
pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED /*| PARAMETER_IS_AUTOMABLE*/;
pData->param.data[j].midiChannel = 0;
pData->param.data[j].midiCC = -1;
pData->param.ranges[j].min = 0.0f;
@@ -724,8 +719,7 @@ public:
j = FluidSynthChorusOnOff;
pData->param.data[j].index = j;
pData->param.data[j].rindex = j;
pData->param.data[j].type = PARAMETER_INPUT;
pData->param.data[j].hints = PARAMETER_IS_ENABLED | PARAMETER_IS_BOOLEAN;
pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED | PARAMETER_IS_BOOLEAN;
pData->param.data[j].midiChannel = 0;
pData->param.data[j].midiCC = -1;
pData->param.ranges[j].min = 0.0f;
@@ -740,8 +734,7 @@ public:
j = FluidSynthChorusNr;
pData->param.data[j].index = j;
pData->param.data[j].rindex = j;
pData->param.data[j].type = PARAMETER_INPUT;
pData->param.data[j].hints = PARAMETER_IS_ENABLED | PARAMETER_IS_INTEGER;
pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED | PARAMETER_IS_INTEGER;
pData->param.data[j].midiChannel = 0;
pData->param.data[j].midiCC = -1;
pData->param.ranges[j].min = 0.0f;
@@ -756,8 +749,7 @@ public:
j = FluidSynthChorusLevel;
pData->param.data[j].index = j;
pData->param.data[j].rindex = j;
pData->param.data[j].type = PARAMETER_INPUT;
pData->param.data[j].hints = PARAMETER_IS_ENABLED;
pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED;
pData->param.data[j].midiChannel = 0;
pData->param.data[j].midiCC = 0; //MIDI_CONTROL_CHORUS_SEND_LEVEL;
pData->param.ranges[j].min = 0.0f;
@@ -772,8 +764,7 @@ public:
j = FluidSynthChorusSpeedHz;
pData->param.data[j].index = j;
pData->param.data[j].rindex = j;
pData->param.data[j].type = PARAMETER_INPUT;
pData->param.data[j].hints = PARAMETER_IS_ENABLED;
pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED;
pData->param.data[j].midiChannel = 0;
pData->param.data[j].midiCC = -1;
pData->param.ranges[j].min = 0.29f;
@@ -788,8 +779,7 @@ public:
j = FluidSynthChorusDepthMs;
pData->param.data[j].index = j;
pData->param.data[j].rindex = j;
pData->param.data[j].type = PARAMETER_INPUT;
pData->param.data[j].hints = PARAMETER_IS_ENABLED;
pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED;
pData->param.data[j].midiChannel = 0;
pData->param.data[j].midiCC = -1;
pData->param.ranges[j].min = 0.0f;
@@ -804,8 +794,7 @@ public:
j = FluidSynthChorusType;
pData->param.data[j].index = j;
pData->param.data[j].rindex = j;
pData->param.data[j].type = PARAMETER_INPUT;
pData->param.data[j].hints = PARAMETER_IS_ENABLED | PARAMETER_IS_INTEGER | PARAMETER_USES_SCALEPOINTS;
pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED | PARAMETER_IS_INTEGER | PARAMETER_USES_SCALEPOINTS;
pData->param.data[j].midiChannel = 0;
pData->param.data[j].midiCC = -1;
pData->param.ranges[j].min = FLUID_CHORUS_MOD_SINE;
@@ -820,8 +809,7 @@ public:
j = FluidSynthPolyphony;
pData->param.data[j].index = j;
pData->param.data[j].rindex = j;
pData->param.data[j].type = PARAMETER_INPUT;
pData->param.data[j].hints = PARAMETER_IS_ENABLED | PARAMETER_IS_INTEGER;
pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED | PARAMETER_IS_INTEGER;
pData->param.data[j].midiChannel = 0;
pData->param.data[j].midiCC = -1;
pData->param.ranges[j].min = 1.0f;
@@ -836,8 +824,7 @@ public:
j = FluidSynthInterpolation;
pData->param.data[j].index = j;
pData->param.data[j].rindex = j;
pData->param.data[j].type = PARAMETER_INPUT;
pData->param.data[j].hints = PARAMETER_IS_ENABLED | PARAMETER_IS_INTEGER | PARAMETER_USES_SCALEPOINTS;
pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED | PARAMETER_IS_INTEGER | PARAMETER_USES_SCALEPOINTS;
pData->param.data[j].midiChannel = 0;
pData->param.data[j].midiCC = -1;
pData->param.ranges[j].min = FLUID_INTERP_NONE;
@@ -852,7 +839,6 @@ public:
j = FluidSynthVoiceCount;
pData->param.data[j].index = j;
pData->param.data[j].rindex = j;
pData->param.data[j].type = PARAMETER_OUTPUT;
pData->param.data[j].hints = PARAMETER_IS_ENABLED | PARAMETER_IS_AUTOMABLE | PARAMETER_IS_INTEGER;
pData->param.data[j].midiChannel = 0;
pData->param.data[j].midiCC = -1;
@@ -1176,7 +1162,7 @@ public:
continue;
if (pData->param.data[k].midiCC != ctrlEvent.param)
continue;
if (pData->param.data[k].type != PARAMETER_INPUT)
if ((pData->param.data[k].hints & PARAMETER_IS_INPUT) == 0)
continue;
if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0)
continue;
@@ -1608,7 +1594,7 @@ public:
// load settings
pData->idStr = "SF2/";
pData->idStr += label;
fOptions = pData->loadSettings(fOptions, getAvailableOptions());
fOptions = pData->loadSettings(fOptions, getOptionsAvailable());
}

return true;


+ 5
- 7
source/backend/plugin/LadspaPlugin.cpp View File

@@ -163,7 +163,7 @@ public:
// -------------------------------------------------------------------
// Information (per-plugin data)

unsigned int getAvailableOptions() const override
unsigned int getOptionsAvailable() const override
{
const bool isDssiVst = fFilename.contains("dssi-vst", true);

@@ -622,7 +622,7 @@ public:

if (LADSPA_IS_PORT_INPUT(portType))
{
pData->param.data[j].type = PARAMETER_INPUT;
pData->param.data[j].hints |= PARAMETER_IS_INPUT;
pData->param.data[j].hints |= PARAMETER_IS_ENABLED;
pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE;
needsCtrlIn = true;
@@ -653,7 +653,6 @@ public:
}
else
{
pData->param.data[j].type = PARAMETER_OUTPUT;
pData->param.data[j].hints |= PARAMETER_IS_ENABLED;
pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE;
needsCtrlOut = true;
@@ -661,7 +660,6 @@ public:
}
else
{
pData->param.data[j].type = PARAMETER_UNKNOWN;
carla_stderr2("WARNING - Got a broken Port (Control, but not input or output)");
}

@@ -988,7 +986,7 @@ public:
continue;
if (pData->param.data[k].midiCC != ctrlEvent.param)
continue;
if (pData->param.data[k].type != PARAMETER_INPUT)
if ((pData->param.data[k].hints & PARAMETER_IS_INPUT) == 0)
continue;
if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0)
continue;
@@ -1059,7 +1057,7 @@ public:

for (uint32_t k=0; k < pData->param.count; ++k)
{
if (pData->param.data[k].type != PARAMETER_OUTPUT)
if (pData->param.data[k].hints & PARAMETER_IS_INPUT)
continue;

pData->param.ranges[k].fixValue(fParamBuffers[k]);
@@ -1481,7 +1479,7 @@ public:
pData->idStr += CarlaString(getUniqueId());
pData->idStr += "/";
pData->idStr += label;
fOptions = pData->loadSettings(fOptions, getAvailableOptions());
fOptions = pData->loadSettings(fOptions, getOptionsAvailable());

// ignore settings, we need this anyway
if (isDssiVst)


+ 3
- 3
source/backend/plugin/LinuxSamplerPlugin.cpp View File

@@ -245,7 +245,7 @@ public:
// -------------------------------------------------------------------
// Information (per-plugin data)

unsigned int getAvailableOptions() const override
unsigned int getOptionsAvailable() const override
{
unsigned int options = 0x0;

@@ -682,7 +682,7 @@ public:
continue;
if (pData->param.data[k].midiCC != ctrlEvent.param)
continue;
if (pData->param.data[k].type != PARAMETER_INPUT)
if ((pData->param.data[k].hints & PARAMETER_IS_INPUT) == 0)
continue;
if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0)
continue;
@@ -1104,7 +1104,7 @@ public:
pData->idStr = kIsGIG ? "GIG" : "SFZ";
pData->idStr += "/";
pData->idStr += label;
fOptions = pData->loadSettings(fOptions, getAvailableOptions());
fOptions = pData->loadSettings(fOptions, getOptionsAvailable());
}

return true;


+ 27
- 31
source/backend/plugin/Lv2Plugin.cpp View File

@@ -397,7 +397,7 @@ public:
// close UI
if (fUi.type != PLUGIN_UI_NULL)
{
showGui(false);
showCustomUI(false);

if (fUi.type == PLUGIN_UI_OSC)
{
@@ -630,7 +630,7 @@ public:
// -------------------------------------------------------------------
// Information (per-plugin data)

unsigned int getAvailableOptions() const override
unsigned int getOptionsAvailable() const override
{
const uint32_t hasMidiIn(getMidiInCount() > 0);

@@ -1066,7 +1066,7 @@ public:
// -------------------------------------------------------------------
// Set gui stuff

void showGui(const bool yesNo) override
void showCustomUI(const bool yesNo) override
{
if (fUi.type == PLUGIN_UI_NULL)
return;
@@ -1229,7 +1229,7 @@ public:
}
}

void idleGui() override
void idle() override
{
//if (fUi.type == PLUGIN_UI_NULL)
// return CarlaPlugin::idleGui();
@@ -1270,12 +1270,12 @@ public:

if (fExt.uiidle != nullptr && fExt.uiidle->idle(fUi.handle) != 0)
{
showGui(false);
showCustomUI(false);
pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, fId, 0, 0, 0.0f, nullptr);
}
}

CarlaPlugin::idleGui();
CarlaPlugin::idle();
}

// -------------------------------------------------------------------
@@ -1570,10 +1570,9 @@ public:
fDescriptor->connect_port(fHandle2, i, fCvIn.ports[j].port->getBuffer());

j = fCvIn.ports[j].param;
pData->param.data[j].type = PARAMETER_INPUT;
pData->param.data[j].index = j;
pData->param.data[j].rindex = i;
pData->param.data[j].hints = PARAMETER_IS_ENABLED|PARAMETER_IS_READ_ONLY;
pData->param.data[j].hints = PARAMETER_IS_INPUT|PARAMETER_IS_ENABLED|PARAMETER_IS_READ_ONLY;
pData->param.data[j].midiChannel = 0;
pData->param.data[j].midiCC = -1;
pData->param.ranges[j].min = -1.0f;
@@ -1598,7 +1597,6 @@ public:
fDescriptor->connect_port(fHandle2, i, fCvOut.ports[j].port->getBuffer());

j = fCvOut.ports[j].param;
pData->param.data[j].type = PARAMETER_OUTPUT;
pData->param.data[j].index = j;
pData->param.data[j].rindex = i;
pData->param.data[j].hints = PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE;
@@ -1960,7 +1958,7 @@ public:
}
else
{
pData->param.data[j].type = PARAMETER_INPUT;
pData->param.data[j].hints |= PARAMETER_IS_INPUT;
pData->param.data[j].hints |= PARAMETER_IS_ENABLED;
pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE;
needsCtrlIn = true;
@@ -2009,7 +2007,6 @@ public:
}
else
{
pData->param.data[j].type = PARAMETER_OUTPUT;
pData->param.data[j].hints |= PARAMETER_IS_ENABLED;
pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE;
needsCtrlOut = true;
@@ -2017,7 +2014,6 @@ public:
}
else
{
pData->param.data[j].type = PARAMETER_UNKNOWN;
carla_stderr2("WARNING - Got a broken Port (Control, but not input or output)");
}

@@ -2121,7 +2117,7 @@ public:

if (fUi.type != PLUGIN_UI_NULL)
{
fHints |= PLUGIN_HAS_GUI;
fHints |= PLUGIN_HAS_CUSTOM_UI;

if (fUi.type == PLUGIN_UI_QT || fUi.type == PLUGIN_UI_PARENT)
fHints |= PLUGIN_NEEDS_SINGLE_THREAD;
@@ -2804,7 +2800,7 @@ public:
continue;
if (pData->param.data[k].midiCC != ctrlEvent.param)
continue;
if (pData->param.data[k].type != PARAMETER_INPUT)
if ((pData->param.data[k].hints & PARAMETER_IS_INPUT) == 0)
continue;
if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0)
continue;
@@ -3064,7 +3060,7 @@ public:

for (k=0; k < pData->param.count; ++k)
{
if (pData->param.data[k].type != PARAMETER_OUTPUT)
if (pData->param.data[k].hints & PARAMETER_IS_INPUT)
continue;

if (pData->param.data[k].hints & PARAMETER_IS_STRICT_BOUNDS)
@@ -3188,7 +3184,7 @@ public:

for (k=0; k < pData->param.count; ++k)
{
if (pData->param.data[k].type != PARAMETER_INPUT)
if ((pData->param.data[k].hints & PARAMETER_IS_INPUT) == 0)
continue;

if (pData->param.data[k].hints & PARAMETER_IS_TRIGGER)
@@ -4046,20 +4042,20 @@ protected:

switch (type)
{
case LV2_UI_GTK2:
return options.bridge_lv2Gtk2;
case LV2_UI_GTK3:
return options.bridge_lv2Gtk3;
case LV2_UI_QT4:
return options.bridge_lv2Qt4;
case LV2_UI_QT5:
return options.bridge_lv2Qt5;
case LV2_UI_COCOA:
return options.bridge_lv2Cocoa;
case LV2_UI_WINDOWS:
return options.bridge_lv2Win;
case LV2_UI_X11:
return options.bridge_lv2X11;
// case LV2_UI_GTK2:
// return options.bridge_lv2Gtk2;
// case LV2_UI_GTK3:
// return options.bridge_lv2Gtk3;
// case LV2_UI_QT4:
// return options.bridge_lv2Qt4;
// case LV2_UI_QT5:
// return options.bridge_lv2Qt5;
// case LV2_UI_COCOA:
// return options.bridge_lv2Cocoa;
// case LV2_UI_WINDOWS:
// return options.bridge_lv2Win;
// case LV2_UI_X11:
// return options.bridge_lv2X11;
default:
return nullptr;
}
@@ -4469,7 +4465,7 @@ public:
// load settings
pData->idStr = "LV2/";
pData->idStr += uri;
fOptions = pData->loadSettings(fOptions, getAvailableOptions());
fOptions = pData->loadSettings(fOptions, getOptionsAvailable());

// ignore settings, we need this anyway
if (getMidiInCount() > 0 || needsFixedBuffer())


+ 1
- 1
source/backend/plugin/Makefile View File

@@ -34,7 +34,7 @@ OBJS = \
LinuxSamplerPlugin.cpp.o

HEADERS = \
../CarlaBackend.hpp ../CarlaEngine.hpp ../CarlaPlugin.hpp \
../CarlaBackend.h ../CarlaEngine.hpp ../CarlaPlugin.hpp \
CarlaPluginInternal.hpp CarlaPluginThread.hpp

TARGET = ../libcarla_plugin.a


+ 9
- 8
source/backend/plugin/NativePlugin.cpp View File

@@ -245,7 +245,7 @@ public:
// -------------------------------------------------------------------
// Information (per-plugin data)

unsigned int getAvailableOptions() const override
unsigned int getOptionsAvailable() const override
{
CARLA_SAFE_ASSERT_RETURN(fDescriptor != nullptr, 0x0);

@@ -628,7 +628,7 @@ public:
// -------------------------------------------------------------------
// Set gui stuff

void showGui(const bool yesNo) override
void showCustomUI(const bool yesNo) override
{
CARLA_SAFE_ASSERT_RETURN(fDescriptor != nullptr,);
CARLA_SAFE_ASSERT_RETURN(fHandle != nullptr,);
@@ -670,13 +670,15 @@ public:
}
}

void idleGui() override
void idle() override
{
CARLA_SAFE_ASSERT_RETURN(fDescriptor != nullptr,);
CARLA_SAFE_ASSERT_RETURN(fHandle != nullptr,);

if (fIsUiVisible && fDescriptor->ui_idle != nullptr)
fDescriptor->ui_idle(fHandle);

CarlaPlugin::idle();
}

// -------------------------------------------------------------------
@@ -959,12 +961,11 @@ public:

if (paramInfo->hints & ::PARAMETER_IS_OUTPUT)
{
pData->param.data[j].type = PARAMETER_OUTPUT;
needsCtrlOut = true;
}
else
{
pData->param.data[j].type = PARAMETER_INPUT;
pData->param.data[j].hints |= PARAMETER_IS_INPUT;
needsCtrlIn = true;
}

@@ -1428,7 +1429,7 @@ public:
continue;
if (pData->param.data[k].midiCC != ctrlEvent.param)
continue;
if (pData->param.data[k].type != PARAMETER_INPUT)
if ((pData->param.data[k].hints & PARAMETER_IS_INPUT) == 0)
continue;
if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0)
continue;
@@ -1614,7 +1615,7 @@ public:

for (k=0; k < pData->param.count; ++k)
{
if (pData->param.data[k].type != PARAMETER_OUTPUT)
if (pData->param.data[k].hints & PARAMETER_IS_INPUT)
continue;

curValue = fDescriptor->get_parameter_value(fHandle, k);
@@ -2317,7 +2318,7 @@ public:
// load settings
pData->idStr = "Native/";
pData->idStr += label;
fOptions = pData->loadSettings(fOptions, getAvailableOptions());
fOptions = pData->loadSettings(fOptions, getOptionsAvailable());

// ignore settings, we need this anyway
if (getMidiInCount() > 0 || (fDescriptor->hints & ::PLUGIN_NEEDS_FIXED_BUFFERS) != 0)


+ 10
- 14
source/backend/plugin/VstPlugin.cpp View File

@@ -72,9 +72,9 @@ public:
carla_debug("VstPlugin::~VstPlugin()");

// close UI
if (fHints & PLUGIN_HAS_GUI)
if (fHints & PLUGIN_HAS_CUSTOM_UI)
{
showGui(false);
showCustomUI(false);

if (fGui.isOsc)
{
@@ -177,7 +177,7 @@ public:
// -------------------------------------------------------------------
// Information (per-plugin data)

unsigned int getAvailableOptions() const override
unsigned int getOptionsAvailable() const override
{
CARLA_ASSERT(fEffect != nullptr);

@@ -363,7 +363,7 @@ public:
// -------------------------------------------------------------------
// Set gui stuff

void showGui(const bool yesNo) override
void showCustomUI(const bool yesNo) override
{
if (fGui.isVisible == yesNo)
return;
@@ -468,7 +468,7 @@ public:
fGui.isVisible = yesNo;
}

void idleGui() override
void idle() override
{
#ifdef VESTIGE_HEADER
if (fEffect != nullptr /*&& effect->ptr1*/)
@@ -486,7 +486,7 @@ public:
}
}

CarlaPlugin::idleGui();
CarlaPlugin::idle();
}

// -------------------------------------------------------------------
@@ -605,10 +605,9 @@ public:

for (j=0; j < params; ++j)
{
pData->param.data[j].type = PARAMETER_INPUT;
pData->param.data[j].index = j;
pData->param.data[j].rindex = j;
pData->param.data[j].hints = 0x0;
pData->param.data[j].hints = PARAMETER_IS_INPUT;
pData->param.data[j].midiChannel = 0;
pData->param.data[j].midiCC = -1;

@@ -787,7 +786,7 @@ public:

if (fEffect->flags & effFlagsHasEditor)
{
fHints |= PLUGIN_HAS_GUI;
fHints |= PLUGIN_HAS_CUSTOM_UI;

if (! fGui.isOsc)
fHints |= PLUGIN_NEEDS_SINGLE_THREAD;
@@ -799,9 +798,6 @@ public:
if ((fEffect->flags & effFlagsCanReplacing) != 0 && fEffect->processReplacing != fEffect->process)
fHints |= PLUGIN_CAN_PROCESS_REPLACING;

if (fEffect->flags & effFlagsHasEditor)
fHints |= PLUGIN_HAS_GUI;

if (static_cast<uintptr_t>(dispatcher(effCanDo, 0, 0, (void*)"hasCockosExtensions", 0.0f)) == 0xbeef0000)
fHints |= PLUGIN_HAS_COCKOS_EXTENSIONS;

@@ -1256,7 +1252,7 @@ public:
continue;
if (pData->param.data[k].midiCC != ctrlEvent.param)
continue;
if (pData->param.data[k].type != PARAMETER_INPUT)
if ((pData->param.data[k].hints & PARAMETER_IS_INPUT) == 0)
continue;
if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0)
continue;
@@ -2327,7 +2323,7 @@ public:
//pData->idStr += std::strrchr(filename, OS_SEP)+1; // FIXME!
//pData->idStr += "/";
pData->idStr += CarlaString(getUniqueId());
fOptions = pData->loadSettings(fOptions, getAvailableOptions());
fOptions = pData->loadSettings(fOptions, getOptionsAvailable());

// ignore settings, we need this anyway
if (getMidiInCount() > 0)


+ 3
- 3
source/backend/standalone/CarlaStandalone.cpp View File

@@ -296,11 +296,11 @@ const char* const* carla_get_engine_driver_device_names(unsigned int index)
return CarlaEngine::getDriverDeviceNames(index);
}

const EngineDriverDeviceInfo* carla_get_engine_driver_device_info(unsigned int index, const char* deviceName)
const EngineDriverDeviceInfo* carla_get_engine_driver_device_info(unsigned int index, const char* name)
{
carla_debug("carla_get_engine_driver_device_info(%i, \"%s\")", index, deviceName);
carla_debug("carla_get_engine_driver_device_info(%i, \"%s\")", index, name);

return CarlaEngine::getDriverDeviceInfo(index, deviceName);
return CarlaEngine::getDriverDeviceInfo(index, name);
}

#if 0


+ 54
- 54
source/backend/standalone/Makefile View File

@@ -8,91 +8,91 @@ include ../Makefile.mk

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

# BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo)
BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo)

# --------------------------------------------------------------
# Common

# LINK_FLAGS += $(shell pkg-config --libs liblo)
LINK_FLAGS += $(shell pkg-config --libs liblo)

# LINK_FLAGS += $(JACKBRIDGE_LIBS)
LINK_FLAGS += $(JACKBRIDGE_LIBS)
# LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
# LINK_FLAGS += $(JUCE_CORE_LIBS)
# LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
# LINK_FLAGS += $(JUCE_EVENTS_LIBS)
# LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
# LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
# LINK_FLAGS += $(RTAUDIO_LIBS)
# LINK_FLAGS += $(RTMIDI_LIBS)
# LINK_FLAGS += $(RTMEMPOOL_LIBS)
#
# ifeq ($(HAVE_OPENGL),true)
# LINK_FLAGS += $(DGL_LIBS)
# endif
#
# ifeq ($(CARLA_PLUGIN_SUPPORT),true)
# LINK_FLAGS += $(LILV_LIBS)
# endif
LINK_FLAGS += $(RTAUDIO_LIBS)
LINK_FLAGS += $(RTMIDI_LIBS)
LINK_FLAGS += $(RTMEMPOOL_LIBS)
ifeq ($(HAVE_OPENGL),true)
LINK_FLAGS += $(DGL_LIBS)
endif
ifeq ($(CARLA_PLUGIN_SUPPORT),true)
LINK_FLAGS += $(LILV_LIBS)
endif

# --------------------------------------------------------------
# Plugin

# ifeq ($(HAVE_FLUIDSYNTH),true)
# LINK_FLAGS += $(shell pkg-config --libs fluidsynth)
# endif
#
# ifeq ($(HAVE_LINUXSAMPLER),true)
# LINK_FLAGS += $(shell pkg-config --libs linuxsampler)
# ifeq ($(WIN32),true)
# LINK_FLAGS += lrpcrt4
# endif
# endif
ifeq ($(HAVE_FLUIDSYNTH),true)
LINK_FLAGS += $(shell pkg-config --libs fluidsynth)
endif
ifeq ($(HAVE_LINUXSAMPLER),true)
LINK_FLAGS += $(shell pkg-config --libs linuxsampler)
ifeq ($(WIN32),true)
LINK_FLAGS += lrpcrt4
endif
endif

# --------------------------------------------------------------
# Native

# ifeq ($(HAVE_AF_DEPS),true)
# LINK_FLAGS += $(shell pkg-config --libs sndfile)
# ifeq ($(HAVE_FFMPEG),true)
# LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil)
# endif
# endif
#
# ifeq ($(HAVE_MF_DEPS),true)
# LINK_FLAGS += $(shell pkg-config --libs smf)
# endif
#
# ifeq ($(HAVE_ZYN_DEPS),true)
# LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml zlib)
# ifeq ($(HAVE_ZYN_UI_DEPS),true)
# LINK_FLAGS += $(shell pkg-config --libs ntk_images ntk)
# endif
# endif
ifeq ($(HAVE_AF_DEPS),true)
LINK_FLAGS += $(shell pkg-config --libs sndfile)
ifeq ($(HAVE_FFMPEG),true)
LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil)
endif
endif
ifeq ($(HAVE_MF_DEPS),true)
LINK_FLAGS += $(shell pkg-config --libs smf)
endif
ifeq ($(HAVE_ZYN_DEPS),true)
LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml zlib)
ifeq ($(HAVE_ZYN_UI_DEPS),true)
LINK_FLAGS += $(shell pkg-config --libs ntk_images ntk)
endif
endif

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

# LIBS = ../libcarla_engine.a
# LIBS += ../libcarla_plugin.a
LIBS = ../libcarla_engine.a
LIBS += ../libcarla_plugin.a

# LIBS += ../../modules/carla_native.a
# LIBS += ../../modules/jackbridge.a
LIBS += ../../modules/carla_native.a
LIBS += ../../modules/jackbridge.a
# LIBS += ../../modules/juce_audio_basics.a
# LIBS += ../../modules/juce_core.a
# LIBS += ../../modules/juce_data_structures.a
# LIBS += ../../modules/juce_events.a
# LIBS += ../../modules/juce_graphics.a
# LIBS += ../../modules/juce_gui_basics.a
# LIBS += ../../modules/rtaudio.a
# LIBS += ../../modules/rtmidi.a
# LIBS += ../../modules/rtmempool.a
LIBS += ../../modules/rtaudio.a
LIBS += ../../modules/rtmidi.a
LIBS += ../../modules/rtmempool.a

# ifeq ($(HAVE_OPENGL),true)
# LIBS += ../../modules/dgl.a
# endif
ifeq ($(HAVE_OPENGL),true)
LIBS += ../../modules/dgl.a
endif

# ifeq ($(CARLA_PLUGIN_SUPPORT),true)
# LIBS += ../../modules/lilv.a
# endif
ifeq ($(CARLA_PLUGIN_SUPPORT),true)
LIBS += ../../modules/lilv.a
endif

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



+ 14
- 10
source/carla_backend.py View File

@@ -977,10 +977,7 @@ class CarlaPortCountInfo(Structure):
("ins", c_uint32),

# Number of outputs.
("outs", c_uint32),

# Total number of ports.
("total", c_uint32)
("outs", c_uint32)
]

# Parameter information.
@@ -1058,8 +1055,7 @@ PyCarlaPluginInfo = {
# @see CarlaPortCountInfo
PyCarlaPortCountInfo = {
'ins': 0,
'outs': 0,
'total': 0
'outs': 0
}

# @see CarlaParameterInfo
@@ -1117,17 +1113,25 @@ class Host(object):
def get_supported_file_extensions(self):
return self.lib.carla_get_supported_file_extensions()

# Get how many engine drivers are available.
def get_engine_driver_count(self):
return self.lib.carla_get_engine_driver_count()

# Get an engine driver name.
# @param index Driver index
def get_engine_driver_name(self, index):
return self.lib.carla_get_engine_driver_name(index)

# Get the device names of an engine driver.
# @param index Driver index
def get_engine_driver_device_names(self, index):
return charPtrPtrToStringList(self.lib.carla_get_engine_driver_device_names(index))

def get_engine_driver_device_info(self, index, deviceName):
return structToDict(self.lib.carla_get_engine_driver_device_info(index, deviceName))
# Get information about a device driver.
# @param index Driver index
# @param name Device name
def get_engine_driver_device_info(self, index, name):
return structToDict(self.lib.carla_get_engine_driver_device_info(index, name))

def get_internal_plugin_count(self):
return self.lib.carla_get_internal_plugin_count()
@@ -1385,8 +1389,6 @@ class Host(object):
self.lib.carla_get_supported_file_extensions.argtypes = None
self.lib.carla_get_supported_file_extensions.restype = c_char_p

return

self.lib.carla_get_engine_driver_count.argtypes = None
self.lib.carla_get_engine_driver_count.restype = c_uint

@@ -1399,6 +1401,8 @@ class Host(object):
self.lib.carla_get_engine_driver_device_info.argtypes = [c_uint, c_char_p]
self.lib.carla_get_engine_driver_device_info.restype = POINTER(EngineDriverDeviceInfo)

return

self.lib.carla_get_internal_plugin_count.argtypes = None
self.lib.carla_get_internal_plugin_count.restype = c_uint



+ 1
- 1
source/modules/jackbridge/JackBridge.hpp View File

@@ -17,7 +17,7 @@
#ifndef JACKBRIDGE_HPP_INCLUDED
#define JACKBRIDGE_HPP_INCLUDED

#include "CarlaDefines.hpp"
#include "CarlaDefines.h"

#ifndef JACKBRIDGE_EXPORT
# undef CARLA_EXPORT


+ 1
- 1
source/modules/jackbridge/JackBridge2.cpp View File

@@ -14,7 +14,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#include "CarlaDefines.hpp"
#include "CarlaDefines.h"

#include "JackBridge.hpp"



+ 1
- 1
source/modules/ladspa_rdf.hpp View File

@@ -18,7 +18,7 @@
#ifndef LADSPA_RDF_HPP_INCLUDED
#define LADSPA_RDF_HPP_INCLUDED

#include "CarlaDefines.hpp"
#include "CarlaDefines.h"

// Base Types
typedef float LADSPA_Data;


+ 1
- 1
source/modules/lv2_rdf.hpp View File

@@ -18,7 +18,7 @@
#ifndef LV2_RDF_HPP_INCLUDED
#define LV2_RDF_HPP_INCLUDED

#include "CarlaDefines.hpp"
#include "CarlaDefines.h"

#ifdef CARLA_PROPER_CPP11_SUPPORT
# include <cstdint>


+ 1
- 1
source/modules/rtmidi/RtMidi.h View File

@@ -45,7 +45,7 @@
#ifndef RTMIDI_H
#define RTMIDI_H

#include "CarlaDefines.hpp"
#include "CarlaDefines.h"

#include "RtError.h"
#include <string>


+ 1
- 1
source/tests/Makefile View File

@@ -24,7 +24,7 @@ BUILD_CXX_FLAGS += -isystem /opt/kxstudio/include

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

ANSI_FLAGS = -DBUILD_ANSI_TEST -DREAL_BUILD -I/usr/include/carla -I/usr/include/carla/includes
ANSI_FLAGS = -DBUILD_ANSI_TEST -DREAL_BUILD -I../backend -I../includes
ANSI_FLAGS += -Wall -Wextra -Werror
ANSI_FLAGS += -DDEBUG -O0 -g
ANSI_FLAGS += -ansi -pedantic -pedantic-errors


+ 27
- 88
source/utils/CarlaBackendUtils.hpp View File

@@ -18,7 +18,7 @@
#ifndef CARLA_BACKEND_UTILS_HPP_INCLUDED
#define CARLA_BACKEND_UTILS_HPP_INCLUDED

#include "CarlaBackend.hpp"
#include "CarlaBackend.h"
#include "CarlaString.hpp"

CARLA_BACKEND_START_NAMESPACE
@@ -143,25 +143,6 @@ const char* PluginCategory2Str(const PluginCategory category)
return nullptr;
}

static inline
const char* ParameterType2Str(const ParameterType type)
{
switch (type)
{
case PARAMETER_UNKNOWN:
return "PARAMETER_UNKNOWN";
case PARAMETER_INPUT:
return "PARAMETER_INPUT";
case PARAMETER_OUTPUT:
return "PARAMETER_OUTPUT";
case PARAMETER_SPECIAL:
return "PARAMETER_SPECIAL";
}

carla_stderr("CarlaBackend::ParameterType2Str(%i) - invalid type", type);
return nullptr;
}

static inline
const char* InternalParameterIndex2Str(const InternalParameterIndex index)
{
@@ -204,8 +185,8 @@ const char* EngineCallbackOpcode2Str(const EngineCallbackOpcode opcode)
return "ENGINE_CALLBACK_PLUGIN_REMOVED";
case ENGINE_CALLBACK_PLUGIN_RENAMED:
return "ENGINE_CALLBACK_PLUGIN_RENAMED";
case ENGINE_CALLBACK_PLUGIN_DISABLED:
return "ENGINE_CALLBACK_PLUGIN_DISABLED";
case ENGINE_CALLBACK_PLUGIN_UNAVAILABLE:
return "ENGINE_CALLBACK_PLUGIN_UNAVAILABLE";
case ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED:
return "ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED";
case ENGINE_CALLBACK_PARAMETER_DEFAULT_CHANGED:
@@ -226,12 +207,22 @@ const char* EngineCallbackOpcode2Str(const EngineCallbackOpcode opcode)
return "ENGINE_CALLBACK_NOTE_OFF";
case ENGINE_CALLBACK_UPDATE:
return "ENGINE_CALLBACK_UPDATE";
case ENGINE_CALLBACK_RELOAD_INFO:
return "ENGINE_CALLBACK_RELOAD_INFO";
case ENGINE_CALLBACK_RELOAD_PARAMETERS:
return "ENGINE_CALLBACK_RELOAD_PARAMETERS";
case ENGINE_CALLBACK_RELOAD_PROGRAMS:
return "ENGINE_CALLBACK_RELOAD_PROGRAMS";
case ENGINE_CALLBACK_RELOAD_ALL:
return "ENGINE_CALLBACK_RELOAD_ALL";
case ENGINE_CALLBACK_PATCHBAY_CLIENT_ADDED:
return "ENGINE_CALLBACK_PATCHBAY_CLIENT_ADDED";
case ENGINE_CALLBACK_PATCHBAY_CLIENT_REMOVED:
return "ENGINE_CALLBACK_PATCHBAY_CLIENT_REMOVED";
case ENGINE_CALLBACK_PATCHBAY_CLIENT_RENAMED:
return "ENGINE_CALLBACK_PATCHBAY_CLIENT_RENAMED";
case ENGINE_CALLBACK_PATCHBAY_CLIENT_ICON_CHANGED:
return "ENGINE_CALLBACK_PATCHBAY_CLIENT_ICON_CHANGED";
case ENGINE_CALLBACK_PATCHBAY_PORT_ADDED:
return "ENGINE_CALLBACK_PATCHBAY_PORT_ADDED";
case ENGINE_CALLBACK_PATCHBAY_PORT_REMOVED:
@@ -242,36 +233,22 @@ const char* EngineCallbackOpcode2Str(const EngineCallbackOpcode opcode)
return "ENGINE_CALLBACK_PATCHBAY_CONNECTION_ADDED";
case ENGINE_CALLBACK_PATCHBAY_CONNECTION_REMOVED:
return "ENGINE_CALLBACK_PATCHBAY_CONNECTION_REMOVED";
case ENGINE_CALLBACK_PATCHBAY_ICON_CHANGED:
return "ENGINE_CALLBACK_PATCHBAY_ICON_CHANGED";
case ENGINE_CALLBACK_RELOAD_INFO:
return "ENGINE_CALLBACK_RELOAD_INFO";
case ENGINE_CALLBACK_RELOAD_PARAMETERS:
return "ENGINE_CALLBACK_RELOAD_PARAMETERS";
case ENGINE_CALLBACK_RELOAD_PROGRAMS:
return "ENGINE_CALLBACK_RELOAD_PROGRAMS";
case ENGINE_CALLBACK_RELOAD_ALL:
return "ENGINE_CALLBACK_RELOAD_ALL";
case ENGINE_CALLBACK_BUFFER_SIZE_CHANGED:
return "ENGINE_CALLBACK_BUFFER_SIZE_CHANGED";
case ENGINE_CALLBACK_SAMPLE_RATE_CHANGED:
return "ENGINE_CALLBACK_SAMPLE_RATE_CHANGED";
case ENGINE_CALLBACK_PROCESS_MODE_CHANGED:
return "ENGINE_CALLBACK_PROCESS_MODE_CHANGED";
case ENGINE_CALLBACK_ENGINE_STARTED:
return "ENGINE_CALLBACK_ENGINE_STARTED";
case ENGINE_CALLBACK_ENGINE_STOPPED:
return "ENGINE_CALLBACK_ENGINE_STOPPED";
case ENGINE_CALLBACK_NSM_ANNOUNCE:
return "ENGINE_CALLBACK_NSM_ANNOUNCE";
case ENGINE_CALLBACK_NSM_OPEN:
return "ENGINE_CALLBACK_NSM_OPEN";
case ENGINE_CALLBACK_NSM_SAVE:
return "ENGINE_CALLBACK_NSM_SAVE";
case ENGINE_CALLBACK_ERROR:
return "ENGINE_CALLBACK_ERROR";
case ENGINE_CALLBACK_PROCESS_MODE_CHANGED:
return "ENGINE_CALLBACK_PROCESS_MODE_CHANGED";
case ENGINE_CALLBACK_TRANSPORT_MODE_CHANGED:
return "ENGINE_CALLBACK_TRANSPORT_MODE_CHANGED";
case ENGINE_CALLBACK_BUFFER_SIZE_CHANGED:
return "ENGINE_CALLBACK_BUFFER_SIZE_CHANGED";
case ENGINE_CALLBACK_SAMPLE_RATE_CHANGED:
return "ENGINE_CALLBACK_SAMPLE_RATE_CHANGED";
case ENGINE_CALLBACK_INFO:
return "ENGINE_CALLBACK_INFO";
case ENGINE_CALLBACK_ERROR:
return "ENGINE_CALLBACK_ERROR";
case ENGINE_CALLBACK_QUIT:
return "ENGINE_CALLBACK_QUIT";
}
@@ -285,8 +262,8 @@ const char* EngineOption2Str(const EngineOption option)
{
switch (option)
{
case ENGINE_OPTION_PROCESS_NAME:
return "ENGINE_OPTION_PROCESS_NAME";
case ENGINE_OPTION_DEBUG:
return "ENGINE_OPTION_DEBUG";
case ENGINE_OPTION_PROCESS_MODE:
return "ENGINE_OPTION_PROCESS_MODE";
case ENGINE_OPTION_TRANSPORT_MODE:
@@ -311,48 +288,10 @@ const char* EngineOption2Str(const EngineOption option)
return "ENGINE_OPTION_AUDIO_SAMPLE_RATE";
case ENGINE_OPTION_AUDIO_DEVICE:
return "ENGINE_OPTION_AUDIO_DEVICE";
case ENGINE_OPTION_PATH_BINARIES:
return "ENGINE_OPTION_PATH_BINARIES";
case ENGINE_OPTION_PATH_RESOURCES:
return "ENGINE_OPTION_PATH_RESOURCES";
#ifndef BUILD_BRIDGE
case ENGINE_OPTION_PATH_BRIDGE_NATIVE:
return "ENGINE_OPTION_PATH_BRIDGE_NATIVE";
case ENGINE_OPTION_PATH_BRIDGE_POSIX32:
return "ENGINE_OPTION_PATH_BRIDGE_POSIX32";
case ENGINE_OPTION_PATH_BRIDGE_POSIX64:
return "ENGINE_OPTION_PATH_BRIDGE_POSIX64";
case ENGINE_OPTION_PATH_BRIDGE_WIN32:
return "ENGINE_OPTION_PATH_BRIDGE_WIN32";
case ENGINE_OPTION_PATH_BRIDGE_WIN64:
return "ENGINE_OPTION_PATH_BRIDGE_WIN64";
#endif
#ifdef WANT_LV2
case ENGINE_OPTION_PATH_BRIDGE_LV2_EXTERNAL:
return "ENGINE_OPTION_PATH_BRIDGE_LV2_EXTERNAL";
case ENGINE_OPTION_PATH_BRIDGE_LV2_GTK2:
return "ENGINE_OPTION_PATH_BRIDGE_LV2_GTK2";
case ENGINE_OPTION_PATH_BRIDGE_LV2_GTK3:
return "ENGINE_OPTION_PATH_BRIDGE_LV2_GTK3";
case ENGINE_OPTION_PATH_BRIDGE_LV2_NTK:
return "ENGINE_OPTION_PATH_BRIDGE_LV2_NTK";
case ENGINE_OPTION_PATH_BRIDGE_LV2_QT4:
return "ENGINE_OPTION_PATH_BRIDGE_LV2_QT4";
case ENGINE_OPTION_PATH_BRIDGE_LV2_QT5:
return "ENGINE_OPTION_PATH_BRIDGE_LV2_QT5";
case ENGINE_OPTION_PATH_BRIDGE_LV2_COCOA:
return "ENGINE_OPTION_PATH_BRIDGE_LV2_COCOA";
case ENGINE_OPTION_PATH_BRIDGE_LV2_WINDOWS:
return "ENGINE_OPTION_PATH_BRIDGE_LV2_WINDOWS";
case ENGINE_OPTION_PATH_BRIDGE_LV2_X11:
return "ENGINE_OPTION_PATH_BRIDGE_LV2_X11";
#endif
#ifdef WANT_VST
case ENGINE_OPTION_PATH_BRIDGE_VST_MAC:
return "ENGINE_OPTION_PATH_BRIDGE_VST_MAC";
case ENGINE_OPTION_PATH_BRIDGE_VST_HWND:
return "ENGINE_OPTION_PATH_BRIDGE_VST_HWND";
case ENGINE_OPTION_PATH_BRIDGE_VST_X11:
return "ENGINE_OPTION_PATH_BRIDGE_VST_X11";
#endif
}

carla_stderr("CarlaBackend::EngineOption2Str(%i) - invalid option", option);


Loading…
Cancel
Save