Browse Source

Backend API updates, misc fixes

tags/1.9.4
falkTX 11 years ago
parent
commit
209bb05a41
8 changed files with 149 additions and 142 deletions
  1. +1
    -0
      source/Makefile.mk
  2. +48
    -59
      source/backend/CarlaBackend.hpp
  3. +54
    -55
      source/carla_backend.py
  4. +34
    -10
      source/tests/ANSI.cpp
  5. +2
    -2
      source/tests/Makefile
  6. +8
    -14
      source/utils/CarlaBackendUtils.hpp
  7. +1
    -1
      source/utils/CarlaLv2Utils.hpp
  8. +1
    -1
      source/utils/CarlaStateUtils.hpp

+ 1
- 0
source/Makefile.mk View File

@@ -60,6 +60,7 @@ ifeq ($(MACOS),true)
# No C++11 support; force 32bit per default
BUILD_C_FLAGS = $(BASE_FLAGS) $(32BIT_FLAGS) -std=gnu99 $(CFLAGS)
BUILD_CXX_FLAGS = $(BASE_FLAGS) $(32BIT_FLAGS) $(CXXFLAGS)
LINK_FLAGS = $(LDFLAGS)
endif

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


+ 48
- 59
source/backend/CarlaBackend.hpp View File

@@ -109,9 +109,8 @@ const unsigned int PARAMETER_USES_CUSTOM_TEXT = 0x100; //!< Parameter uses custo
* \see CustomData
* @{
*/
const char* const CUSTOM_DATA_INVALID = nullptr; //!< Null or invalid data.
const char* const CUSTOM_DATA_CHUNK = "http://kxstudio.sf.net/ns/carla/chunk"; //!< Carla chunk URI.
const char* const CUSTOM_DATA_STRING = "http://kxstudio.sf.net/ns/carla/string"; //!< Carla string URI.
const char* const CUSTOM_DATA_CHUNK = "http://kxstudio.sf.net/ns/carla/chunk"; //!< Carla chunk URI.
const char* const CUSTOM_DATA_STRING = "http://kxstudio.sf.net/ns/carla/string"; //!< Carla string URI.
/**@}*/

/*!
@@ -120,18 +119,19 @@ const char* const CUSTOM_DATA_STRING = "http://kxstudio.sf.net/ns/carla/string"
* Various patchbay port hints.
* @{
*/
const unsigned int PATCHBAY_PORT_IS_INPUT = 0x01; //!< Patchbay port is input.
const unsigned int PATCHBAY_PORT_IS_OUTPUT = 0x02; //!< Patchbay port is output.
const unsigned int PATCHBAY_PORT_IS_AUDIO = 0x10; //!< Patchbay port is of Audio type.
const unsigned int PATCHBAY_PORT_IS_CV = 0x20; //!< Patchbay port is of CV type.
const unsigned int PATCHBAY_PORT_IS_MIDI = 0x40; //!< Patchbay port is of MIDI type.
const unsigned int PATCHBAY_PORT_IS_PARAMETER = 0x80; //!< Patchbay port is of Parameter type.
const unsigned int PATCHBAY_PORT_IS_INPUT = 0x001; //!< Patchbay port is input.
const unsigned int PATCHBAY_PORT_IS_OUTPUT = 0x002; //!< Patchbay port is output.
const unsigned int PATCHBAY_PORT_IS_AUDIO = 0x010; //!< Patchbay port is of Audio type.
const unsigned int PATCHBAY_PORT_IS_CV = 0x020; //!< Patchbay port is of CV type.
const unsigned int PATCHBAY_PORT_IS_MIDI = 0x040; //!< Patchbay port is of MIDI type.
const unsigned int PATCHBAY_PORT_IS_OSC = 0x100; //!< Patchbay port is of OSC type.
const unsigned int PATCHBAY_PORT_IS_PARAMETER = 0x200; //!< Patchbay port is of Parameter type.
/**@}*/

/*!
* The binary type of a plugin.
*/
enum BinaryType {
enum BinaryType : int {
BINARY_NONE = 0, //!< Null binary type.
BINARY_POSIX32 = 1, //!< POSIX 32bit.
BINARY_POSIX64 = 2, //!< POSIX 64bit.
@@ -144,7 +144,7 @@ enum BinaryType {
* All the available plugin types, provided by subclasses of CarlaPlugin.\n
* Some plugin classes might provide more than 1 plugin type.
*/
enum PluginType {
enum PluginType : int {
PLUGIN_NONE = 0, //!< Null plugin type.
PLUGIN_INTERNAL = 1, //!< Internal plugin.
PLUGIN_LADSPA = 2, //!< LADSPA plugin.
@@ -162,7 +162,7 @@ enum PluginType {
* Plugin category, describing the funtionality of a plugin.\n
* When a plugin fails to tell its own category, one is atributted to it based on its name.
*/
enum PluginCategory {
enum PluginCategory : int {
PLUGIN_CATEGORY_NONE = 0, //!< Null plugin category.
PLUGIN_CATEGORY_SYNTH = 1, //!< A synthesizer or generator.
PLUGIN_CATEGORY_DELAY = 2, //!< A delay or reverberator.
@@ -177,7 +177,7 @@ enum PluginCategory {
/*!
* Plugin parameter type.
*/
enum ParameterType {
enum ParameterType : int {
PARAMETER_UNKNOWN = 0, //!< Null parameter type.
PARAMETER_INPUT = 1, //!< Input parameter.
PARAMETER_OUTPUT = 2, //!< Ouput parameter.
@@ -193,7 +193,7 @@ enum ParameterType {
* Internal parameter indexes.\n
* These are special parameters used internally, plugins do not know about their existence.
*/
enum InternalParametersIndex {
enum InternalParametersIndex : int {
PARAMETER_NULL = -1, //!< Null parameter.
PARAMETER_ACTIVE = -2, //!< Active parameter, can only be 'true' or 'false'; default is 'false'.
PARAMETER_DRYWET = -3, //!< Dry/Wet parameter, range 0.0...1.0; default is 1.0.
@@ -208,7 +208,7 @@ enum InternalParametersIndex {
/*!
* The icon of a patchbay client/group.
*/
enum PatchbayIconType {
enum PatchbayIconType : int {
PATCHBAY_ICON_APPLICATION = 0, //!< Generic application icon.
PATCHBAY_ICON_HARDWARE = 1, //!< Hardware icon.
PATCHBAY_ICON_CARLA = 2, //!< Carla icon.
@@ -221,7 +221,7 @@ enum PatchbayIconType {
* Options used in the CarlaEngine::setOption() calls.\n
* All options except paths must be set before initiliazing or after closing the engine.
*/
enum OptionsType {
enum OptionsType : int {
/*!
* Set the current process name.\n
* This is a convenience option, as Python lacks this functionality.
@@ -267,87 +267,76 @@ enum OptionsType {
*/
OPTION_UIS_ALWAYS_ON_TOP = 6,

#ifdef WANT_DSSI
/*!
* Use (unofficial) dssi-vst chunks feature.\n
* Default is no.
* \see PLUGIN_OPTION_USE_CHUNKS
*/
OPTION_USE_DSSI_VST_CHUNKS = 7,
#endif

/*!
* Maximum number of parameters allowed.\n
* Default is MAX_DEFAULT_PARAMETERS.
*/
OPTION_MAX_PARAMETERS = 8,
OPTION_MAX_PARAMETERS = 7,

/*!
* Timeout value in ms for how much to wait for UI-Bridges to respond.\n
* Default is 4000 (4 secs).
*/
OPTION_UI_BRIDGES_TIMEOUT = 9,
OPTION_UI_BRIDGES_TIMEOUT = 8,

#ifdef WANT_RTAUDIO
/*!
* RtAudio number of periods.
* Audio number of periods.
*/
OPTION_RTAUDIO_NUMBER_PERIODS = 10,
OPTION_AUDIO_NUM_PERIODS = 9,

/*!
* RtAudio buffer size.
* Audio buffer size.
*/
OPTION_RTAUDIO_BUFFER_SIZE = 11,
OPTION_AUDIO_BUFFER_SIZE = 10,

/*!
* RtAudio sample rate.
* Audio sample rate.
*/
OPTION_RTAUDIO_SAMPLE_RATE = 12,
OPTION_AUDIO_SAMPLE_RATE = 11,

/*!
* RtAudio device.
* Audio device.
*/
OPTION_RTAUDIO_DEVICE = 13,
#endif
OPTION_AUDIO_DEVICE = 12,

/*!
* Set path to the backend resource files.\n
* Set path to the resource files.\n
* Default unset.
*
* \note Must be set for some internal plugins to work!
*/
OPTION_PATH_RESOURCES = 14,
OPTION_PATH_RESOURCES = 13,

#ifndef BUILD_BRIDGE
/*!
* Set path to the native plugin bridge executable.\n
* Default unset.
*/
OPTION_PATH_BRIDGE_NATIVE = 15,
OPTION_PATH_BRIDGE_NATIVE = 14,

/*!
* Set path to the POSIX 32bit plugin bridge executable.\n
* Default unset.
*/
OPTION_PATH_BRIDGE_POSIX32 = 16,
OPTION_PATH_BRIDGE_POSIX32 = 15,

/*!
* Set path to the POSIX 64bit plugin bridge executable.\n
* Default unset.
*/
OPTION_PATH_BRIDGE_POSIX64 = 17,
OPTION_PATH_BRIDGE_POSIX64 = 16,

/*!
* Set path to the Windows 32bit plugin bridge executable.\n
* Default unset.
*/
OPTION_PATH_BRIDGE_WIN32 = 18,
OPTION_PATH_BRIDGE_WIN32 = 17,

/*!
* Set path to the Windows 64bit plugin bridge executable.\n
* Default unset.
*/
OPTION_PATH_BRIDGE_WIN64 = 19,
OPTION_PATH_BRIDGE_WIN64 = 18,
#endif

#ifdef WANT_LV2
@@ -355,49 +344,49 @@ enum OptionsType {
* Set path to the LV2 External UI bridge executable.\n
* Default unset.
*/
OPTION_PATH_BRIDGE_LV2_EXTERNAL = 20,
OPTION_PATH_BRIDGE_LV2_EXTERNAL = 19,

/*!
* Set path to the LV2 Gtk2 UI bridge executable.\n
* Default unset.
*/
OPTION_PATH_BRIDGE_LV2_GTK2 = 21,
OPTION_PATH_BRIDGE_LV2_GTK2 = 20,

/*!
* Set path to the LV2 Gtk3 UI bridge executable.\n
* Default unset.
*/
OPTION_PATH_BRIDGE_LV2_GTK3 = 22,
OPTION_PATH_BRIDGE_LV2_GTK3 = 21,

/*!
* Set path to the LV2 Qt4 UI bridge executable.\n
* Default unset.
*/
OPTION_PATH_BRIDGE_LV2_QT4 = 23,
OPTION_PATH_BRIDGE_LV2_QT4 = 22,

/*!
* Set path to the LV2 Qt5 UI bridge executable.\n
* Default unset.
*/
OPTION_PATH_BRIDGE_LV2_QT5 = 24,
OPTION_PATH_BRIDGE_LV2_QT5 = 23,

/*!
* Set path to the LV2 Cocoa UI bridge executable.\n
* Default unset.
*/
OPTION_PATH_BRIDGE_LV2_COCOA = 25,
OPTION_PATH_BRIDGE_LV2_COCOA = 24,

/*!
* Set path to the LV2 Windows UI bridge executable.\n
* Default unset.
*/
OPTION_PATH_BRIDGE_LV2_WINDOWS = 26,
OPTION_PATH_BRIDGE_LV2_WINDOWS = 25,

/*!
* Set path to the LV2 X11 UI bridge executable.\n
* Default unset.
*/
OPTION_PATH_BRIDGE_LV2_X11 = 27,
OPTION_PATH_BRIDGE_LV2_X11 = 26,
#endif

#ifdef WANT_VST
@@ -405,19 +394,19 @@ enum OptionsType {
* Set path to the VST Mac UI bridge executable.\n
* Default unset.
*/
OPTION_PATH_BRIDGE_VST_MAC = 28,
OPTION_PATH_BRIDGE_VST_MAC = 27,

/*!
* Set path to the VST HWND UI bridge executable.\n
* Default unset.
*/
OPTION_PATH_BRIDGE_VST_HWND = 29,
OPTION_PATH_BRIDGE_VST_HWND = 28,

/*!
* Set path to the VST X11 UI bridge executable.\n
* Default unset.
*/
OPTION_PATH_BRIDGE_VST_X11 = 30
OPTION_PATH_BRIDGE_VST_X11 = 29
#endif
};

@@ -425,7 +414,7 @@ enum OptionsType {
* Opcodes sent from the engine callback to the GUI, as defined by CallbackFunc.
* \see CarlaEngine::setCallback()
*/
enum CallbackType {
enum CallbackType : int {
/*!
* Debug.\n
* This opcode is undefined and used only for testing purposes.
@@ -660,7 +649,7 @@ enum CallbackType {
* Engine process mode.
* \see OPTION_PROCESS_MODE
*/
enum ProcessMode {
enum ProcessMode : int {
PROCESS_MODE_SINGLE_CLIENT = 0, //!< Single client mode (dynamic input/outputs as needed by plugins).
PROCESS_MODE_MULTIPLE_CLIENTS = 1, //!< Multiple client mode (1 master client + 1 client per plugin).
PROCESS_MODE_CONTINUOUS_RACK = 2, //!< Single client, 'rack' mode. Processes plugins in order of Id, with forced stereo.
@@ -671,7 +660,7 @@ enum ProcessMode {
/*!
* All the available transport modes
*/
enum TransportMode {
enum TransportMode : int {
TRANSPORT_MODE_INTERNAL = 0, //!< Internal transport mode.
TRANSPORT_MODE_JACK = 1, //!< Transport from JACK, only available if driver name is "JACK".
TRANSPORT_MODE_PLUGIN = 2, //!< Transport from host, used when Carla is a plugin.
@@ -734,7 +723,7 @@ struct ParameterRanges {

void fixValue(float& value) const noexcept
{
if (value < min)
if (value <= min)
value = min;
else if (value > max)
value = max;


+ 54
- 55
source/carla_backend.py View File

@@ -60,23 +60,23 @@ else:
# ------------------------------------------------------------------------------------------------------------
# Convert a ctypes char** into a python string list

def charStringList(charPtr):
i = 0
retList = []
def charStringList(charPtrPtr):
if not charPtrPtr:
return []

if not charPtr:
return retList
i = 0
strList = []

while True:
char_p = charPtr[i]
charPtr = charPtrPtr[i]

if not char_p:
if not charPtr:
break

retList.append(char_p.decode("utf-8", errors="ignore"))
strList.append(charPtr.decode("utf-8", errors="ignore"))
i += 1

return retList
return strList

# ------------------------------------------------------------------------------------------------------------
# Convert a ctypes struct into a python dict
@@ -93,18 +93,18 @@ MAX_PATCHBAY_PLUGINS = 999
MAX_DEFAULT_PARAMETERS = 200

# Plugin Hints
PLUGIN_IS_BRIDGE = 0x001
PLUGIN_IS_RTSAFE = 0x002
PLUGIN_IS_SYNTH = 0x004
PLUGIN_HAS_GUI = 0x010
PLUGIN_HAS_SINGLE_THREAD = 0x020
PLUGIN_CAN_DRYWET = 0x100
PLUGIN_CAN_VOLUME = 0x200
PLUGIN_CAN_BALANCE = 0x400
PLUGIN_CAN_PANNING = 0x800
PLUGIN_IS_BRIDGE = 0x001
PLUGIN_IS_RTSAFE = 0x002
PLUGIN_HAS_GUI = 0x004
PLUGIN_CAN_DRYWET = 0x010
PLUGIN_CAN_VOLUME = 0x020
PLUGIN_CAN_BALANCE = 0x040
PLUGIN_CAN_PANNING = 0x080
PLUGIN_NEEDS_SINGLE_THREAD = 0x100
PLUGIN_NEEDS_FIXED_BUFFERS = 0x200

# Plugin Options
PLUGIN_OPTION_FIXED_BUFFER = 0x001
PLUGIN_OPTION_FIXED_BUFFERS = 0x001
PLUGIN_OPTION_FORCE_STEREO = 0x002
PLUGIN_OPTION_MAP_PROGRAM_CHANGES = 0x004
PLUGIN_OPTION_USE_CHUNKS = 0x008
@@ -126,17 +126,17 @@ PARAMETER_USES_SCALEPOINTS = 0x080
PARAMETER_USES_CUSTOM_TEXT = 0x100

# Custom Data types
CUSTOM_DATA_INVALID = None
CUSTOM_DATA_CHUNK = "http://kxstudio.sf.net/ns/carla/chunk"
CUSTOM_DATA_STRING = "http://kxstudio.sf.net/ns/carla/string"
CUSTOM_DATA_CHUNK = "http://kxstudio.sf.net/ns/carla/chunk"
CUSTOM_DATA_STRING = "http://kxstudio.sf.net/ns/carla/string"

# Patchbay Port Hints
PATCHBAY_PORT_IS_INPUT = 0x01
PATCHBAY_PORT_IS_OUTPUT = 0x02
PATCHBAY_PORT_IS_AUDIO = 0x10
PATCHBAY_PORT_IS_CV = 0x20
PATCHBAY_PORT_IS_MIDI = 0x40
PATCHBAY_PORT_IS_PARAMETER = 0x80
PATCHBAY_PORT_IS_INPUT = 0x001
PATCHBAY_PORT_IS_OUTPUT = 0x002
PATCHBAY_PORT_IS_AUDIO = 0x010
PATCHBAY_PORT_IS_CV = 0x020
PATCHBAY_PORT_IS_MIDI = 0x040
PATCHBAY_PORT_IS_OSC = 0x100
PATCHBAY_PORT_IS_PARAMETER = 0x200

# Binary Type
BINARY_NONE = 0
@@ -206,30 +206,29 @@ OPTION_FORCE_STEREO = 3
OPTION_PREFER_PLUGIN_BRIDGES = 4
OPTION_PREFER_UI_BRIDGES = 5
OPTION_UIS_ALWAYS_ON_TOP = 6
OPTION_USE_DSSI_VST_CHUNKS = 7
OPTION_MAX_PARAMETERS = 8
OPTION_UI_BRIDGES_TIMEOUT = 9
OPTION_RTAUDIO_NUMBER_PERIODS = 10
OPTION_RTAUDIO_BUFFER_SIZE = 11
OPTION_RTAUDIO_SAMPLE_RATE = 12
OPTION_RTAUDIO_DEVICE = 13
OPTION_PATH_RESOURCES = 14
OPTION_PATH_BRIDGE_NATIVE = 15
OPTION_PATH_BRIDGE_POSIX32 = 16
OPTION_PATH_BRIDGE_POSIX64 = 17
OPTION_PATH_BRIDGE_WIN32 = 18
OPTION_PATH_BRIDGE_WIN64 = 19
OPTION_PATH_BRIDGE_LV2_EXTERNAL = 20
OPTION_PATH_BRIDGE_LV2_GTK2 = 21
OPTION_PATH_BRIDGE_LV2_GTK3 = 22
OPTION_PATH_BRIDGE_LV2_QT4 = 23
OPTION_PATH_BRIDGE_LV2_QT5 = 24
OPTION_PATH_BRIDGE_LV2_COCOA = 25
OPTION_PATH_BRIDGE_LV2_WINDOWS = 26
OPTION_PATH_BRIDGE_LV2_X11 = 27
OPTION_PATH_BRIDGE_VST_COCOA = 28
OPTION_PATH_BRIDGE_VST_HWND = 29
OPTION_PATH_BRIDGE_VST_X11 = 30
OPTION_MAX_PARAMETERS = 7
OPTION_UI_BRIDGES_TIMEOUT = 8
OPTION_AUDIO_NUM_PERIODS = 9
OPTION_AUDIO_BUFFER_SIZE = 10
OPTION_AUDIO_SAMPLE_RATE = 11
OPTION_AUDIO_DEVICE = 12
OPTION_PATH_RESOURCES = 13
OPTION_PATH_BRIDGE_NATIVE = 14
OPTION_PATH_BRIDGE_POSIX32 = 15
OPTION_PATH_BRIDGE_POSIX64 = 16
OPTION_PATH_BRIDGE_WIN32 = 17
OPTION_PATH_BRIDGE_WIN64 = 18
OPTION_PATH_BRIDGE_LV2_EXTERNAL = 19
OPTION_PATH_BRIDGE_LV2_GTK2 = 20
OPTION_PATH_BRIDGE_LV2_GTK3 = 21
OPTION_PATH_BRIDGE_LV2_QT4 = 22
OPTION_PATH_BRIDGE_LV2_QT5 = 23
OPTION_PATH_BRIDGE_LV2_COCOA = 24
OPTION_PATH_BRIDGE_LV2_WINDOWS = 25
OPTION_PATH_BRIDGE_LV2_X11 = 26
OPTION_PATH_BRIDGE_VST_MAC = 27
OPTION_PATH_BRIDGE_VST_HWND = 28
OPTION_PATH_BRIDGE_VST_X11 = 29

# Callback Type
CALLBACK_DEBUG = 0
@@ -259,9 +258,9 @@ CALLBACK_PATCHBAY_PORT_RENAMED = 23
CALLBACK_PATCHBAY_CONNECTION_ADDED = 24
CALLBACK_PATCHBAY_CONNECTION_REMOVED = 25
CALLBACK_PATCHBAY_ICON_CHANGED = 26
CALLBACK_BUFFER_SIZE_CHANGED = 27
CALLBACK_SAMPLE_RATE_CHANGED = 28
CALLBACK_PROCESS_MODE_CHANGED = 29
CALLBACK_BUFFER_SIZE_CHANGED = 27
CALLBACK_SAMPLE_RATE_CHANGED = 28
CALLBACK_PROCESS_MODE_CHANGED = 29
CALLBACK_NSM_ANNOUNCE = 30
CALLBACK_NSM_OPEN = 31
CALLBACK_NSM_SAVE = 32


+ 34
- 10
source/tests/ANSI.cpp View File

@@ -21,11 +21,20 @@

#define RING_BUFFER_SIZE 48

// 0 - base
// 1 - utils
// 2 - engine
// 3 - plugin
// 4 - standalone
#define ANSI_TEST_N 2
#define ANSI_TEST_N 0

#if ANSI_TEST_N == 0
// utils
#include "CarlaUtils.hpp"

// Carla Backend API
#include "CarlaBackend.hpp"
#endif

#if ANSI_TEST_N == 1
// includes
@@ -73,8 +82,8 @@
// Carla Engine API
#include "CarlaEngine.hpp"

// Carla Standalone API
#include "CarlaStandalone.hpp"
// Carla Host API
#include "CarlaHost.hpp"
// ANSI_TEST_N == 1
#endif

@@ -90,8 +99,8 @@
#endif

#if ANSI_TEST_N == 4
// Carla Standalone
#include "CarlaStandalone.hpp"
// Carla Host Standalone
#include "CarlaHost.hpp"
#include "CarlaUtils.hpp"
#endif

@@ -99,6 +108,7 @@
// -----------------------------------------------------------------------

namespace CB = CarlaBackend;
using juce::ScopedPointer;

int safe_assert_return_test(bool test)
{
@@ -111,6 +121,20 @@ int safe_assert_return_test(bool test)

int main()
{
#if ANSI_TEST_N == 0
CARLA_BACKEND_USE_NAMESPACE

BinaryType b;
CallbackType c;
CARLA_ASSERT(sizeof(b) == sizeof(BinaryType));
CARLA_ASSERT(sizeof(b) == sizeof(int));
CARLA_ASSERT(sizeof(BinaryType) == sizeof(int));

CARLA_ASSERT(sizeof(c) == sizeof(CallbackType));
CARLA_ASSERT(sizeof(c) == sizeof(int));
CARLA_ASSERT(sizeof(CallbackType) == sizeof(int));
#endif

#if ANSI_TEST_N == 1
// ladspa rdf
{
@@ -429,16 +453,16 @@ int main()

// Carla Native Plugin API (C++)
{
class PluginDescriptorClassTest : public PluginDescriptorClass
class PluginClassTest : public PluginClass
{
public:
PluginDescriptorClassTest(const HostDescriptor* const host)
: PluginDescriptorClass(host) {}
: PluginClass(host) {}
protected:
void process(float** const, float** const, const uint32_t, const uint32_t, const MidiEvent* const) {}
void process(float** const, float** const, const uint32_t, const MidiEvent* const, const uint32_t) {}

PluginDescriptorClassEND(PluginDescriptorClassTest)
CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PluginDescriptorClassTest)
PluginClassEND(PluginClassTest)
CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PluginClassTest)
};

const HostDescriptor a = { nullptr, nullptr, nullptr,


+ 2
- 2
source/tests/Makefile View File

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

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

BUILD_CXX_FLAGS += -I../backend -I../includes -I../modules -I../modules/distrho -I../modules/theme -I../modules/utils -I../modules/widgets
BUILD_CXX_FLAGS += -I../backend -I../includes -I../modules -I../modules/distrho -I../modules/theme -I../modules/widgets -I../utils
BUILD_CXX_FLAGS += -DWANT_NATIVE -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST -DWANT_FLUIDSYNTH -DWANT_LINUXSAMPLER
BUILD_CXX_FLAGS += -DWANT_RTAUDIO -DWANT_OPENGL -DWANT_AUDIOFILE -DWANT_MIDIFILE -DWANT_ZYNADDSUBFX -DWANT_ZYNADDSUBFX_UI
BUILD_CXX_FLAGS += -isystem /usr/include/qt4
@@ -41,7 +41,7 @@ all: $(TARGETS) RUN

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

ANSI: ANSI.cpp ../backend/standalone/CarlaStandalone.cpp.o CarlaBackendDummy.cpp.o ../modules/theme.a
ANSI: ANSI.cpp #../backend/standalone/CarlaStandalone.cpp.o CarlaBackendDummy.cpp.o ../modules/theme.a
$(CXX) $^ $(BUILD_CXX_FLAGS) $(ANSI_CXX_FLAGS) $(LINK_FLAGS) -L/opt/kxstudio/lib -lQtCore -lQtGui -llo -o $@

CarlaString: CarlaString.cpp ../modules/utils/CarlaString.hpp


+ 8
- 14
source/utils/CarlaBackendUtils.hpp View File

@@ -214,24 +214,18 @@ const char* OptionsType2Str(const OptionsType option)
return "OPTION_PREFER_UI_BRIDGES";
case OPTION_UIS_ALWAYS_ON_TOP:
return "OPTION_UIS_ALWAYS_ON_TOP";
#ifdef WANT_DSSI
case OPTION_USE_DSSI_VST_CHUNKS:
return "OPTION_USE_DSSI_VST_CHUNKS";
#endif
case OPTION_MAX_PARAMETERS:
return "OPTION_MAX_PARAMETERS";
case OPTION_UI_BRIDGES_TIMEOUT:
return "OPTION_UI_BRIDGES_TIMEOUT";
#ifdef WANT_RTAUDIO
case OPTION_RTAUDIO_NUMBER_PERIODS:
return "OPTION_RTAUDIO_NUMBER_PERIODS";
case OPTION_RTAUDIO_BUFFER_SIZE:
return "OPTION_RTAUDIO_BUFFER_SIZE";
case OPTION_RTAUDIO_SAMPLE_RATE:
return "OPTION_RTAUDIO_SAMPLE_RATE";
case OPTION_RTAUDIO_DEVICE:
return "OPTION_RTAUDIO_DEVICE";
#endif
case OPTION_AUDIO_NUM_PERIODS:
return "OPTION_AUDIO_NUM_PERIODS";
case OPTION_AUDIO_BUFFER_SIZE:
return "OPTION_AUDIO_BUFFER_SIZE";
case OPTION_AUDIO_SAMPLE_RATE:
return "OPTION_AUDIO_SAMPLE_RATE";
case OPTION_AUDIO_DEVICE:
return "OPTION_AUDIO_DEVICE";
case OPTION_PATH_RESOURCES:
return "OPTION_PATH_RESOURCES";
#ifndef BUILD_BRIDGE


+ 1
- 1
source/utils/CarlaLv2Utils.hpp View File

@@ -554,7 +554,7 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri, const bool fillPresets)
if (replaceURI.startsWith("urn:"))
{
if (int uniqueId = replaceURI.getTrailingIntValue())
rdfDescriptor->UniqueID = uniqueId;
rdfDescriptor->UniqueID = (unsigned long)uniqueId;
}
}
}


+ 1
- 1
source/utils/CarlaStateUtils.hpp View File

@@ -353,7 +353,7 @@ void fillSaveStateFromXmlElement(SaveState& saveState, const XmlElement& xmlElem
{
const int index(pText.getIntValue());
if (index >= 0)
stateParameter->index = index;
stateParameter->index = static_cast<uint32_t>(index);
}
else if (pTag.equalsIgnoreCase("name"))
{


Loading…
Cancel
Save