Browse Source

Minor API var name changes and ANSI-C fix; Small makefile update

tags/1.9.4
falkTX 11 years ago
parent
commit
b167010ffd
6 changed files with 74 additions and 87 deletions
  1. +13
    -12
      source/Makefile.mk
  2. +46
    -46
      source/backend/CarlaBackend.h
  3. +6
    -6
      source/backend/CarlaHost.h
  4. +8
    -8
      source/carla_backend.py
  5. +1
    -9
      source/tests/Makefile
  6. +0
    -6
      source/tests/ansi-pedantic-test.c

+ 13
- 12
source/Makefile.mk View File

@@ -26,9 +26,6 @@ AR ?= ar
RM ?= rm -f
CC ?= gcc
CXX ?= g++
MOC ?= moc
RCC ?= rcc
UIC ?= uic

# --------------------------------------------------------------
# Fallback to Linux if no other OS defined
@@ -46,7 +43,7 @@ endif

BASE_FLAGS = -Wall -Wextra -Wcast-qual -Wconversion -Wlogical-op -Werror -fPIC -DPIC -pipe -DREAL_BUILD
BASE_OPTS = -O3 -ffast-math -mtune=generic -msse -msse2 -mfpmath=sse -fdata-sections -ffunction-sections
LINK_OPTS = -Wl,--gc-sections
LINK_OPTS = -fdata-sections -ffunction-sections -Wl,--gc-sections

# -Waggregate-return -Wsign-conversion

@@ -62,19 +59,19 @@ LINK_OPTS =
else
BASE_FLAGS += -DNDEBUG $(BASE_OPTS) -fvisibility=hidden
CXXFLAGS += -fvisibility-inlines-hidden
# LINK_OPTS += -Wl,--strip-all
LINK_OPTS += -Wl,-O1 -Wl,--strip-all
endif

32BIT_FLAGS = -m32
64BIT_FLAGS = -m64

BUILD_C_FLAGS = $(BASE_FLAGS) -std=gnu99 $(CFLAGS)
BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=gnu++0x $(CXXFLAGS)
BUILD_C_FLAGS = $(BASE_FLAGS) -std=c99 -std=gnu99 $(CFLAGS)
BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=c++0x -std=gnu++0x $(CXXFLAGS)
LINK_FLAGS = $(LINK_OPTS) -Wl,--no-undefined $(LDFLAGS)

ifeq ($(MACOS),true)
# No C++11 support; force 32bit per default
BUILD_C_FLAGS = $(BASE_FLAGS) $(32BIT_FLAGS) -std=gnu99 $(CFLAGS)
BUILD_C_FLAGS += $(32BIT_FLAGS)
BUILD_CXX_FLAGS = $(BASE_FLAGS) $(32BIT_FLAGS) $(CXXFLAGS)
LINK_FLAGS = $(32BIT_FLAGS) $(LDFLAGS)
endif
@@ -169,6 +166,11 @@ endif
LIBLO_FLAGS = $(shell pkg-config --cflags liblo)
LIBLO_LIBS = $(shell pkg-config --libs liblo)

ifeq ($(HAVE_CSOUND),true)
CSOUND_FLAGS = $(shell pkg-config --cflags sndfile) -DUSE_DOUBLE=1
CSOUND_LIBS = $(shell pkg-config --libs sndfile) -lcsound64
endif

ifeq ($(HAVE_FLUIDSYNTH),true)
FLUIDSYNTH_FLAGS = $(shell pkg-config --cflags fluidsynth)
FLUIDSYNTH_LIBS = $(shell pkg-config --libs fluidsynth)
@@ -273,11 +275,10 @@ RCC_QT4 ?= $(shell pkg-config --variable=rcc_location QtCore)
UIC_QT4 ?= $(shell pkg-config --variable=uic_location QtCore)
endif

# FIXME - use prefix /qt5/bin/moc or something
ifeq ($(HAVE_QT5),true)
MOC_QT5 ?= moc
RCC_QT5 ?= rcc
UIC_QT5 ?= uic
MOC_QT5 ?= $(shell pkg-config --variable=libdir Qt5Core)/qt5/bin/moc
RCC_QT5 ?= $(shell pkg-config --variable=libdir Qt5Core)/qt5/bin/rcc
UIC_QT5 ?= $(shell pkg-config --variable=libdir Qt5Core)/qt5/bin/uic
endif

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

+ 46
- 46
source/backend/CarlaBackend.h View File

@@ -45,8 +45,8 @@ CARLA_BACKEND_START_NAMESPACE
* @{
*/

// ------------------------------------------------------------------------------------------------------------
// Carla Backend API (base definitions)
/* ------------------------------------------------------------------------------------------------------------
* Carla Backend API (base definitions) */

/*!
* Maximum default number of loadable plugins.
@@ -69,8 +69,8 @@ const unsigned int MAX_PATCHBAY_PLUGINS = 255;
*/
const unsigned int MAX_DEFAULT_PARAMETERS = 200;

// ------------------------------------------------------------------------------------------------------------
// Engine Driver Device Hints
/* ------------------------------------------------------------------------------------------------------------
* Engine Driver Device Hints */

/*!
* @defgroup EngineDriverHints Engine Driver Device Hints
@@ -99,8 +99,8 @@ const unsigned int ENGINE_DRIVER_DEVICE_VARIABLE_SAMPLE_RATE = 0x4;

/** @} */

// ------------------------------------------------------------------------------------------------------------
// Plugin Hints
/* ------------------------------------------------------------------------------------------------------------
* Plugin Hints */

/*!
* @defgroup PluginHints Plugin Hints
@@ -164,8 +164,8 @@ const unsigned int PLUGIN_NEEDS_SINGLE_THREAD = 0x200;

/** @} */

// ------------------------------------------------------------------------------------------------------------
// Plugin Options
/* ------------------------------------------------------------------------------------------------------------
* Plugin Options */

/*!
* @defgroup PluginOptions Plugin Options
@@ -222,8 +222,8 @@ const unsigned int PLUGIN_OPTION_SEND_ALL_SOUND_OFF = 0x100;

/** @} */

// ------------------------------------------------------------------------------------------------------------
// Parameter Hints
/* ------------------------------------------------------------------------------------------------------------
* Parameter Hints */

/*!
* @defgroup ParameterHints Parameter Hints
@@ -285,8 +285,8 @@ const unsigned int PARAMETER_USES_CUSTOM_TEXT = 0x400;

/** @} */

// ------------------------------------------------------------------------------------------------------------
// Patchbay Port Hints
/* ------------------------------------------------------------------------------------------------------------
* Patchbay Port Hints */

/*!
* @defgroup PatchbayPortHints Patchbay Port Hints
@@ -318,8 +318,8 @@ const unsigned int PATCHBAY_PORT_TYPE_MIDI = 0x8;

/** @} */

// ------------------------------------------------------------------------------------------------------------
// Custom Data Types
/* ------------------------------------------------------------------------------------------------------------
* Custom Data Types */

/*!
* @defgroup CustomDataTypes Custom Data Types
@@ -347,8 +347,8 @@ const char* const CUSTOM_DATA_TYPE_STRING = "http://kxstudio.sf.net/ns/carla/str

/** @} */

// ------------------------------------------------------------------------------------------------------------
// Custom Data Keys
/* ------------------------------------------------------------------------------------------------------------
* Custom Data Keys */

/*!
* @defgroup CustomDataKeys Custom Data Keys
@@ -380,8 +380,8 @@ const char* const CUSTOM_DATA_KEY_UI_VISIBLE = "CarlaUiVisible";

/** @} */

// ------------------------------------------------------------------------------------------------------------
// Binary Type
/* ------------------------------------------------------------------------------------------------------------
* Binary Type */

/*!
* The binary type of a plugin.
@@ -419,8 +419,8 @@ typedef enum {

} BinaryType;

// ------------------------------------------------------------------------------------------------------------
// Plugin Type
/* ------------------------------------------------------------------------------------------------------------
* Plugin Type */

/*!
* Plugin type.
@@ -464,29 +464,29 @@ typedef enum {
PLUGIN_AU = 6,

/*!
* Csound file.
* Single CSD file (Csound).
*/
PLUGIN_CSOUND = 7,
PLUGIN_FILE_CSD = 7,

/*!
* GIG file.
* Single GIG file.
*/
PLUGIN_GIG = 8,
PLUGIN_FILE_GIG = 8,

/*!
* SF2 file (also known as SoundFont).
* Single SF2 file (SoundFont).
*/
PLUGIN_SF2 = 9,
PLUGIN_FILE_SF2 = 9,

/*!
* SFZ file.
* Single SFZ file.
*/
PLUGIN_SFZ = 10
PLUGIN_FILE_SFZ = 10

} PluginType;

// ------------------------------------------------------------------------------------------------------------
// Plugin Category
/* ------------------------------------------------------------------------------------------------------------
* Plugin Category */

/*!
* Plugin category, which describes the functionality of a plugin.
@@ -544,8 +544,8 @@ typedef enum {

} PluginCategory;

// ------------------------------------------------------------------------------------------------------------
// Parameter Type
/* ------------------------------------------------------------------------------------------------------------
* Parameter Type */

/*!
* Plugin parameter type.
@@ -573,8 +573,8 @@ typedef enum {

} ParameterType;

// ------------------------------------------------------------------------------------------------------------
// Internal Parameter Index
/* ------------------------------------------------------------------------------------------------------------
* Internal Parameter Index */

/*!
* Special parameters used internally in Carla.\n
@@ -635,8 +635,8 @@ typedef enum {

} InternalParameterIndex;

// ------------------------------------------------------------------------------------------------------------
// Engine Callback Opcode
/* ------------------------------------------------------------------------------------------------------------
* Engine Callback Opcode */

/*!
* Engine callback opcodes.\n
@@ -911,8 +911,8 @@ typedef enum {

} EngineCallbackOpcode;

// ------------------------------------------------------------------------------------------------------------
// Engine Option
/* ------------------------------------------------------------------------------------------------------------
* Engine Option */

/*!
* Engine options.
@@ -1017,8 +1017,8 @@ typedef enum {

} EngineOption;

// ------------------------------------------------------------------------------------------------------------
// Engine Process Mode
/* ------------------------------------------------------------------------------------------------------------
* Engine Process Mode */

/*!
* Engine process mode.
@@ -1055,8 +1055,8 @@ typedef enum {

} EngineProcessMode;

// ------------------------------------------------------------------------------------------------------------
// Engine Transport Mode
/* ------------------------------------------------------------------------------------------------------------
* Engine Transport Mode */

/*!
* Engine transport mode.
@@ -1086,8 +1086,8 @@ typedef enum {

} EngineTransportMode;

// ------------------------------------------------------------------------------------------------------------
// Patchbay Icon
/* ------------------------------------------------------------------------------------------------------------
* Patchbay Icon */

/*!
* The icon of a patchbay client/group.
@@ -1130,8 +1130,8 @@ enum PatchbayIcon {
PATCHBAY_ICON_FILE = 5
};

// ------------------------------------------------------------------------------------------------------------
// Carla Backend API (C stuff)
/* ------------------------------------------------------------------------------------------------------------
* Carla Backend API (C stuff) */

/*!
* Engine callback function.\n


+ 6
- 6
source/backend/CarlaHost.h View File

@@ -51,8 +51,8 @@ using CarlaBackend::CarlaPlugin;
* @{
*/

// ------------------------------------------------------------------------------------------------------------
// File Callback Opcode
/* ------------------------------------------------------------------------------------------------------------
* File Callback Opcode */

/*!
* File callback opcodes.\n
@@ -78,8 +78,8 @@ typedef enum {

} FileCallbackOpcode;

// ------------------------------------------------------------------------------------------------------------
// Carla Host API (C stuff)
/* ------------------------------------------------------------------------------------------------------------
* Carla Host API (C stuff) */

/*!
* File callback function.
@@ -461,8 +461,8 @@ typedef struct _CarlaTransportInfo {
#endif
} CarlaTransportInfo;

// ------------------------------------------------------------------------------------------------------------
// Carla Host API (C functions)
/* ------------------------------------------------------------------------------------------------------------
* Carla Host API (C functions) */

/*!
* Get the complete license text of used third-party code and features.\n


+ 8
- 8
source/carla_backend.py View File

@@ -351,17 +351,17 @@ PLUGIN_VST = 5
# @note MacOS only
PLUGIN_AU = 6

# Csound file.
PLUGIN_CSOUND = 7
# Single CSD file (Csound).
PLUGIN_FILE_CSD = 7

# GIG file.
PLUGIN_GIG = 8
# Single GIG file.
PLUGIN_FILE_GIG = 8

# SF2 file (also known as SoundFont).
PLUGIN_SF2 = 9
# Single SF2 file (SoundFont).
PLUGIN_FILE_SF2 = 9

# SFZ file.
PLUGIN_SFZ = 10
# Single SFZ file.
PLUGIN_FILE_SFZ = 10

# ------------------------------------------------------------------------------------------------------------
# Plugin Category


+ 1
- 9
source/tests/Makefile View File

@@ -9,16 +9,8 @@ include ../Makefile.mk
# --------------------------------------------------------------

BUILD_CXX_FLAGS += -I. -I../backend -I../includes -I../modules -I../modules/distrho -I../utils
BUILD_CXX_FLAGS += -std=c++11 -Wzero-as-null-pointer-constant
BUILD_CXX_FLAGS += -std=c++11 -std=gnu++11 -Wzero-as-null-pointer-constant
BUILD_CXX_FLAGS += -isystem /opt/kxstudio/include
# BUILD_CXX_FLAGS += -isystem /usr/include/qt5
# BUILD_CXX_FLAGS += -I/opt/mingw32/include

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

# ANSI_CXX_FLAGS += -ansi -pedantic -pedantic-errors -Wunused-parameter -Wuninitialized -Wno-vla
# ANSI_CXX_FLAGS += -Wcast-qual -Wconversion -Wsign-conversion -Wlogical-op -Waggregate-return
# ANSI_CXX_FLAGS += -std=c++11 -Wzero-as-null-pointer-constant

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



+ 0
- 6
source/tests/ansi-pedantic-test.c View File

@@ -89,12 +89,6 @@ int main(int argc, char* argv[])
printf("%s\n", carla_get_last_error());
}

while (carla_is_engine_running())
{
carla_engine_idle();
sleep(1);
}

carla_engine_close();
}



Loading…
Cancel
Save