@@ -18,7 +18,7 @@ | |||||
#ifndef CARLA_ENGINE_HPP_INCLUDED | #ifndef CARLA_ENGINE_HPP_INCLUDED | ||||
#define CARLA_ENGINE_HPP_INCLUDED | #define CARLA_ENGINE_HPP_INCLUDED | ||||
#include "CarlaBackend.hpp" | |||||
#include "CarlaBackend.h" | |||||
#include "CarlaMIDI.h" | #include "CarlaMIDI.h" | ||||
#include "CarlaString.hpp" | #include "CarlaString.hpp" | ||||
@@ -36,6 +36,7 @@ using CarlaBackend::MidiProgramData; | |||||
using CarlaBackend::CustomData; | using CarlaBackend::CustomData; | ||||
using CarlaBackend::EngineDriverDeviceInfo; | using CarlaBackend::EngineDriverDeviceInfo; | ||||
using CarlaBackend::CarlaEngine; | using CarlaBackend::CarlaEngine; | ||||
using CarlaBackend::CarlaPlugin; | |||||
#endif | #endif | ||||
/*! | /*! | ||||
@@ -472,16 +473,16 @@ typedef struct _CarlaTransportInfo { | |||||
* Get the complete license text of used third-party code and features.\n | * Get the complete license text of used third-party code and features.\n | ||||
* Returned string is in basic html format. | * Returned string is in basic html format. | ||||
*/ | */ | ||||
CARLA_EXPORT const char* carla_get_extended_license_text(); | |||||
CARLA_EXPORT const char* carla_get_complete_license_text(); | |||||
/*! | /*! | ||||
* Get the supported file types in carla_load_filename().\n | |||||
* Get all the supported file types in carla_load_filename().\n | |||||
* Returned string uses this syntax: | * Returned string uses this syntax: | ||||
* \code | |||||
* @code | |||||
* "*.ext1;*.ext2;*.ext3" | * "*.ext1;*.ext2;*.ext3" | ||||
* \endcode | |||||
* @endcode | |||||
*/ | */ | ||||
CARLA_EXPORT const char* carla_get_supported_file_types(); | |||||
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 to use. | ||||
@@ -947,4 +948,4 @@ CARLA_EXPORT const char* carla_get_host_osc_url_udp(); | |||||
/** @} */ | /** @} */ | ||||
#endif // CARLA_HOST_H_INCLUDED | |||||
#endif /* CARLA_HOST_H_INCLUDED */ |
@@ -18,7 +18,7 @@ | |||||
#ifndef CARLA_PLUGIN_HPP_INCLUDED | #ifndef CARLA_PLUGIN_HPP_INCLUDED | ||||
#define CARLA_PLUGIN_HPP_INCLUDED | #define CARLA_PLUGIN_HPP_INCLUDED | ||||
#include "CarlaBackend.hpp" | |||||
#include "CarlaBackend.h" | |||||
#include "CarlaString.hpp" | #include "CarlaString.hpp" | ||||
// Avoid including extra libs here | // Avoid including extra libs here | ||||
@@ -47,6 +47,9 @@ endif | |||||
ifeq ($(HAVE_ZYN_DEPS),true) | ifeq ($(HAVE_ZYN_DEPS),true) | ||||
BUILD_CXX_FLAGS += -DWANT_ZYNADDSUBFX | BUILD_CXX_FLAGS += -DWANT_ZYNADDSUBFX | ||||
ifeq ($(HAVE_ZYN_UI_DEPS),true) | |||||
BUILD_CXX_FLAGS += -DWANT_ZYNADDSUBFX_UI | |||||
endif | |||||
endif | endif | ||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- |
@@ -22,31 +22,17 @@ | |||||
#include "CarlaEngine.hpp" | #include "CarlaEngine.hpp" | ||||
#include "CarlaPlugin.hpp" | #include "CarlaPlugin.hpp" | ||||
#include "CarlaBackendUtils.hpp" | |||||
#include "CarlaOscUtils.hpp" | |||||
#include "CarlaNative.h" | |||||
//#include "CarlaBackendUtils.hpp" | |||||
//#include "CarlaOscUtils.hpp" | |||||
//#include "CarlaNative.h" | |||||
#ifdef USE_JUCE | #ifdef USE_JUCE | ||||
# include "juce_gui_basics.h" | # include "juce_gui_basics.h" | ||||
#endif | #endif | ||||
//#include "CarlaLogThread.hpp" | |||||
//#if ! (defined(DEBUG) || defined(WANT_LOGS) || defined(BUILD_ANSI_TEST)) | |||||
//# define WANT_LOGS | |||||
//#endif | |||||
namespace CB = CarlaBackend; | namespace CB = CarlaBackend; | ||||
using CB::CarlaEngine; | |||||
using CB::CarlaPlugin; | |||||
using CB::EngineCallbackFunc; | |||||
using CB::EngineOptions; | |||||
using CB::EngineTimeInfo; | |||||
using CB::FileCallbackFunc; | |||||
#ifdef USE_JUCE | #ifdef USE_JUCE | ||||
using namespace juce; | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
// Juce Message Thread | // Juce Message Thread | ||||
@@ -95,17 +81,22 @@ juce_ImplementSingleton(JuceMessageThread) | |||||
// Single, standalone engine | // Single, standalone engine | ||||
struct CarlaBackendStandalone { | struct CarlaBackendStandalone { | ||||
EngineCallbackFunc callback; | |||||
void* callbackPtr; | |||||
CarlaEngine* engine; | |||||
EngineCallbackFunc engineCallback; | |||||
void* engineCallbackPtr; | |||||
//EngineOptions engineOptions; | |||||
FileCallbackFunc fileCallback; | |||||
void* fileCallbackPtr; | |||||
CarlaEngine* engine; | |||||
CarlaString lastError; | |||||
EngineOptions options; | |||||
CarlaString lastError; | |||||
CarlaBackendStandalone() | CarlaBackendStandalone() | ||||
: callback(nullptr), | |||||
callbackPtr(nullptr), | |||||
engine(nullptr) {} | |||||
: engine(nullptr), | |||||
engineCallback(nullptr), | |||||
engineCallbackPtr(nullptr), | |||||
fileCallback(nullptr), | |||||
fileCallbackPtr(nullptr) {} | |||||
~CarlaBackendStandalone() | ~CarlaBackendStandalone() | ||||
{ | { | ||||
@@ -115,52 +106,35 @@ struct CarlaBackendStandalone { | |||||
#endif | #endif | ||||
} | } | ||||
#ifdef USE_JUCE | |||||
void init() | void init() | ||||
{ | { | ||||
#ifdef USE_JUCE | |||||
JUCE_AUTORELEASEPOOL | JUCE_AUTORELEASEPOOL | ||||
initialiseJuce_GUI(); | initialiseJuce_GUI(); | ||||
JuceMessageThread::getInstance(); | JuceMessageThread::getInstance(); | ||||
#endif | |||||
} | } | ||||
void idle() {} | |||||
void close() | void close() | ||||
{ | { | ||||
#ifdef USE_JUCE | |||||
JUCE_AUTORELEASEPOOL | JUCE_AUTORELEASEPOOL | ||||
JuceMessageThread::deleteInstance(); | JuceMessageThread::deleteInstance(); | ||||
shutdownJuce_GUI(); | shutdownJuce_GUI(); | ||||
#endif | |||||
} | } | ||||
#endif | |||||
CARLA_DECLARE_NON_COPY_STRUCT(CarlaBackendStandalone) | CARLA_DECLARE_NON_COPY_STRUCT(CarlaBackendStandalone) | ||||
}; | }; | ||||
struct CarlaBackendFileHandler { | |||||
FileCallbackFunc callback; | |||||
void* callbackPtr; | |||||
CarlaBackendFileHandler() | |||||
: callback(nullptr), | |||||
callbackPtr(nullptr) {} | |||||
}; | |||||
//#ifdef WANT_LOGS | |||||
//static CarlaLogThread gLogThread; | |||||
//#endif | |||||
static CarlaBackendStandalone gStandalone; | |||||
static CarlaBackendFileHandler gFileHandler; | |||||
static CarlaBackendStandalone gStandalone; | |||||
// ------------------------------------------------------------------------------------------------------------------- | // ------------------------------------------------------------------------------------------------------------------- | ||||
// API | // API | ||||
const char* carla_get_extended_license_text() | |||||
const char* carla_get_complete_license_text() | |||||
{ | { | ||||
carla_debug("carla_get_extended_license_text()"); | |||||
carla_debug("carla_get_complete_license_text()"); | |||||
static CarlaString retText; | static CarlaString retText; | ||||
@@ -205,23 +179,24 @@ const char* carla_get_extended_license_text() | |||||
text2 += "<li>LinuxSampler library for GIG and SFZ support*, http://www.linuxsampler.org/</li>"; | text2 += "<li>LinuxSampler library for GIG and SFZ support*, http://www.linuxsampler.org/</li>"; | ||||
#endif | #endif | ||||
#ifdef WANT_NATIVE | |||||
// Internal plugins | // Internal plugins | ||||
#ifdef WANT_OPENGL | |||||
# ifdef WANT_OPENGL | |||||
text3 += "<li>DISTRHO Mini-Series plugin code, based on LOSER-dev suite by Michael Gruhn</li>"; | text3 += "<li>DISTRHO Mini-Series plugin code, based on LOSER-dev suite by Michael Gruhn</li>"; | ||||
#endif | |||||
# endif | |||||
text3 += "<li>NekoFilter plugin code, based on lv2fil by Nedko Arnaudov and Fons Adriaensen</li>"; | text3 += "<li>NekoFilter plugin code, based on lv2fil by Nedko Arnaudov and Fons Adriaensen</li>"; | ||||
//text1 += "<li>SunVox library file support, http://www.warmplace.ru/soft/sunvox/</li>"; // unfinished | //text1 += "<li>SunVox library file support, http://www.warmplace.ru/soft/sunvox/</li>"; // unfinished | ||||
#ifdef WANT_AUDIOFILE | |||||
# ifdef WANT_AUDIOFILE | |||||
text3 += "<li>AudioDecoder library for Audio file support, by Robin Gareus</li>"; | text3 += "<li>AudioDecoder library for Audio file support, by Robin Gareus</li>"; | ||||
#endif | |||||
#ifdef WANT_MIDIFILE | |||||
# endif | |||||
# ifdef WANT_MIDIFILE | |||||
text3 += "<li>LibSMF library for MIDI file support, http://libsmf.sourceforge.net/</li>"; | text3 += "<li>LibSMF library for MIDI file support, http://libsmf.sourceforge.net/</li>"; | ||||
#endif | |||||
#ifdef WANT_ZYNADDSUBFX | |||||
# endif | |||||
# ifdef WANT_ZYNADDSUBFX | |||||
text3 += "<li>ZynAddSubFX plugin code, http://zynaddsubfx.sf.net/</li>"; | text3 += "<li>ZynAddSubFX plugin code, http://zynaddsubfx.sf.net/</li>"; | ||||
# ifdef WANT_ZYNADDSUBFX_UI | |||||
# ifdef WANT_ZYNADDSUBFX_UI | |||||
text3 += "<li>ZynAddSubFX UI using NTK, http://non.tuxfamily.org/wiki/NTK</li>"; | text3 += "<li>ZynAddSubFX UI using NTK, http://non.tuxfamily.org/wiki/NTK</li>"; | ||||
# endif | |||||
# endif | # endif | ||||
#endif | #endif | ||||
@@ -243,8 +218,8 @@ const char* carla_get_extended_license_text() | |||||
text5 += "<li>Real-time memory pool, by Nedko Arnaudov</li>"; | text5 += "<li>Real-time memory pool, by Nedko Arnaudov</li>"; | ||||
text5 += "</ul>"; | text5 += "</ul>"; | ||||
// LinuxSampler GPL exception | |||||
#ifdef WANT_LINUXSAMPLER | #ifdef WANT_LINUXSAMPLER | ||||
// LinuxSampler GPL exception | |||||
text5 += "<p>(*) Using LinuxSampler code in commercial hardware or software products is not allowed without prior written authorization by the authors.</p>"; | text5 += "<p>(*) Using LinuxSampler code in commercial hardware or software products is not allowed without prior written authorization by the authors.</p>"; | ||||
#endif | #endif | ||||
@@ -254,9 +229,9 @@ const char* carla_get_extended_license_text() | |||||
return retText; | return retText; | ||||
} | } | ||||
const char* carla_get_supported_file_types() | |||||
const char* carla_get_supported_file_extensions() | |||||
{ | { | ||||
carla_debug("carla_get_supported_file_types()"); | |||||
carla_debug("carla_get_supported_file_extensions()"); | |||||
static CarlaString retText; | static CarlaString retText; | ||||
@@ -321,13 +296,14 @@ const char* const* carla_get_engine_driver_device_names(unsigned int index) | |||||
return CarlaEngine::getDriverDeviceNames(index); | return CarlaEngine::getDriverDeviceNames(index); | ||||
} | } | ||||
const CarlaEngineDriverDeviceInfo* 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* deviceName) | |||||
{ | { | ||||
carla_debug("carla_get_engine_driver_device_info(%i, \"%s\")", index, deviceName); | carla_debug("carla_get_engine_driver_device_info(%i, \"%s\")", index, deviceName); | ||||
return CarlaEngine::getDriverDeviceInfo(index, deviceName); | return CarlaEngine::getDriverDeviceInfo(index, deviceName); | ||||
} | } | ||||
#if 0 | |||||
// ------------------------------------------------------------------------------------------------------------------- | // ------------------------------------------------------------------------------------------------------------------- | ||||
unsigned int carla_get_internal_plugin_count() | unsigned int carla_get_internal_plugin_count() | ||||
@@ -2245,6 +2221,18 @@ void carla_nsm_reply_save() | |||||
gCarlaNSM.replySave(); | gCarlaNSM.replySave(); | ||||
} | } | ||||
#endif | |||||
// ------------------------------------------------------------------------------------------------------------------- | |||||
//#include "CarlaLogThread.hpp" | |||||
//#if ! (defined(DEBUG) || defined(WANT_LOGS) || defined(BUILD_ANSI_TEST)) | |||||
//# define WANT_LOGS | |||||
//#endif | |||||
//#ifdef WANT_LOGS | |||||
//static CarlaLogThread gLogThread; | |||||
//#endif | |||||
// ------------------------------------------------------------------------------------------------------------------- | // ------------------------------------------------------------------------------------------------------------------- | ||||
@@ -8,91 +8,91 @@ include ../Makefile.mk | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo) | |||||
# BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo) | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
# Common | # 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_AUDIO_BASICS_LIBS) | ||||
# LINK_FLAGS += $(JUCE_CORE_LIBS) | # LINK_FLAGS += $(JUCE_CORE_LIBS) | ||||
# LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS) | # LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS) | ||||
# LINK_FLAGS += $(JUCE_EVENTS_LIBS) | # LINK_FLAGS += $(JUCE_EVENTS_LIBS) | ||||
# LINK_FLAGS += $(JUCE_GRAPHICS_LIBS) | # LINK_FLAGS += $(JUCE_GRAPHICS_LIBS) | ||||
# LINK_FLAGS += $(JUCE_GUI_BASICS_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 | # 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 | # 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_audio_basics.a | ||||
# LIBS += ../../modules/juce_core.a | # LIBS += ../../modules/juce_core.a | ||||
# LIBS += ../../modules/juce_data_structures.a | # LIBS += ../../modules/juce_data_structures.a | ||||
# LIBS += ../../modules/juce_events.a | # LIBS += ../../modules/juce_events.a | ||||
# LIBS += ../../modules/juce_graphics.a | # LIBS += ../../modules/juce_graphics.a | ||||
# LIBS += ../../modules/juce_gui_basics.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 | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
@@ -100,7 +100,7 @@ OBJS = \ | |||||
CarlaStandalone.cpp.o | CarlaStandalone.cpp.o | ||||
HEADERS = \ | HEADERS = \ | ||||
../CarlaBackend.hpp ../CarlaEngine.hpp ../CarlaPlugin.hpp ../CarlaHost.hpp ../../modules/CarlaNative.h | |||||
../CarlaBackend.h ../CarlaHost.h ../CarlaEngine.hpp ../CarlaPlugin.hpp ../../modules/CarlaNative.h | |||||
ifeq ($(WIN32),true) | ifeq ($(WIN32),true) | ||||
TARGET = ../libcarla_standalone2.dll | TARGET = ../libcarla_standalone2.dll | ||||
@@ -889,16 +889,16 @@ class CarlaPluginInfo(Structure): | |||||
# @see PluginOptions | # @see PluginOptions | ||||
("optionsAvailable", c_uint), | ("optionsAvailable", c_uint), | ||||
# Plugin options currently enabled.\n | |||||
# Plugin options currently enabled. | |||||
# Some options are enabled but not available, which means they will always be on. | # Some options are enabled but not available, which means they will always be on. | ||||
# @see PluginOptions | # @see PluginOptions | ||||
("optionsEnabled", c_uint), | ("optionsEnabled", c_uint), | ||||
# Plugin filename.\n | |||||
# Plugin filename. | |||||
# This can be the plugin binary or resource file. | # This can be the plugin binary or resource file. | ||||
("filename", c_char_p), | ("filename", c_char_p), | ||||
# Plugin name.\n | |||||
# Plugin name. | |||||
# This name is unique within a Carla instance. | # This name is unique within a Carla instance. | ||||
# @see carla_get_real_plugin_name() | # @see carla_get_real_plugin_name() | ||||
("name", c_char_p), | ("name", c_char_p), | ||||
@@ -912,15 +912,15 @@ class CarlaPluginInfo(Structure): | |||||
# Plugin copyright/license. | # Plugin copyright/license. | ||||
("copyright", c_char_p), | ("copyright", c_char_p), | ||||
# Icon name for this plugin, in lowercase.\n | |||||
# Icon name for this plugin, in lowercase. | |||||
# Default is "plugin". | # Default is "plugin". | ||||
("iconName", c_char_p), | ("iconName", c_char_p), | ||||
# Patchbay client Id for this plugin.\n | |||||
# Patchbay client Id for this plugin. | |||||
# When 0, Id is considered invalid or unused. | # When 0, Id is considered invalid or unused. | ||||
("patchbayClientId", c_int), | ("patchbayClientId", c_int), | ||||
# Plugin unique Id.\n | |||||
# Plugin unique Id. | |||||
# This Id is dependant on the plugin type and may sometimes be 0. | # This Id is dependant on the plugin type and may sometimes be 0. | ||||
("uniqueId", c_long) | ("uniqueId", c_long) | ||||
] | ] | ||||
@@ -1104,12 +1104,18 @@ class Host(object): | |||||
object.__init__(self) | object.__init__(self) | ||||
self._init(libName) | self._init(libName) | ||||
# ... | |||||
def get_extended_license_text(self): | |||||
return self.lib.carla_get_extended_license_text() | |||||
# Get the complete license text of used third-party code and features. | |||||
# Returned string is in basic html format. | |||||
def get_complete_license_text(self): | |||||
return self.lib.carla_get_complete_license_text() | |||||
def get_supported_file_types(self): | |||||
return self.lib.carla_get_supported_file_types() | |||||
# Get all the supported file types in carla_load_filename(). | |||||
# Returned string uses this syntax: | |||||
# @code | |||||
# "*.ext1;*.ext2;*.ext3" | |||||
# @endcode | |||||
def get_supported_file_extensions(self): | |||||
return self.lib.carla_get_supported_file_extensions() | |||||
def get_engine_driver_count(self): | def get_engine_driver_count(self): | ||||
return self.lib.carla_get_engine_driver_count() | return self.lib.carla_get_engine_driver_count() | ||||
@@ -1373,11 +1379,13 @@ class Host(object): | |||||
def _init(self, libName): | def _init(self, libName): | ||||
self.lib = cdll.LoadLibrary(libName) | self.lib = cdll.LoadLibrary(libName) | ||||
self.lib.carla_get_extended_license_text.argtypes = None | |||||
self.lib.carla_get_extended_license_text.restype = c_char_p | |||||
self.lib.carla_get_complete_license_text.argtypes = None | |||||
self.lib.carla_get_complete_license_text.restype = c_char_p | |||||
self.lib.carla_get_supported_file_extensions.argtypes = None | |||||
self.lib.carla_get_supported_file_extensions.restype = c_char_p | |||||
self.lib.carla_get_supported_file_types.argtypes = None | |||||
self.lib.carla_get_supported_file_types.restype = c_char_p | |||||
return | |||||
self.lib.carla_get_engine_driver_count.argtypes = None | self.lib.carla_get_engine_driver_count.argtypes = None | ||||
self.lib.carla_get_engine_driver_count.restype = c_uint | self.lib.carla_get_engine_driver_count.restype = c_uint | ||||
@@ -26,9 +26,10 @@ 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/usr/include/carla -I/usr/include/carla/includes | ||||
ANSI_FLAGS += -Wall -Wextra -Werror | ANSI_FLAGS += -Wall -Wextra -Werror | ||||
BASE_FLAGS += -DDEBUG -O0 -g | |||||
BASE_FLAGS += -ansi -pedantic -pedantic-errors | |||||
BASE_FLAGS += -Wunused-parameter -Wuninitialized -Wcast-qual -Wconversion -Wsign-conversion -Wlogical-op -Waggregate-return | |||||
ANSI_FLAGS += -DDEBUG -O0 -g | |||||
ANSI_FLAGS += -ansi -pedantic -pedantic-errors | |||||
ANSI_FLAGS += -Wunused-parameter -Wuninitialized -Wcast-qual -Wconversion -Wsign-conversion -Wlogical-op -Waggregate-return | |||||
ANSI_FLAGS += -L../backend -lcarla_standalone2 | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
@@ -18,11 +18,37 @@ | |||||
#include "CarlaBackend.h" | #include "CarlaBackend.h" | ||||
#include "CarlaHost.h" | #include "CarlaHost.h" | ||||
#include <stdio.h> | |||||
int main(int argc, char* argv[]) | int main(int argc, char* argv[]) | ||||
{ | { | ||||
ParameterData a; | |||||
ParameterRanges b; | |||||
MidiProgramData c; | |||||
CustomData d; | |||||
EngineDriverDeviceInfo e; | |||||
CarlaPluginInfo f; | |||||
CarlaNativePluginInfo g; | |||||
CarlaPortCountInfo h; | |||||
CarlaParameterInfo i; | |||||
CarlaScalePointInfo j; | |||||
CarlaTransportInfo k; | |||||
const char* licenseText; | |||||
const char* fileExtensions; | |||||
licenseText = carla_get_complete_license_text(); | |||||
printf("LICENSE:\n%s\n", licenseText); | |||||
fileExtensions = carla_get_supported_file_extensions(); | |||||
printf("FILE EXTENSIONS:\n%s\n", fileExtensions); | |||||
return 0; | return 0; | ||||
/* unused */ | /* unused */ | ||||
(void)argc; | (void)argc; | ||||
(void)argv; | (void)argv; | ||||
(void)a; (void)b; (void)c; (void)d; (void)e; | |||||
(void)f; (void)g; (void)h; (void)i; (void)j; (void)k; | |||||
} | } |
@@ -18,7 +18,7 @@ | |||||
#ifndef CARLA_UTILS_HPP_INCLUDED | #ifndef CARLA_UTILS_HPP_INCLUDED | ||||
#define CARLA_UTILS_HPP_INCLUDED | #define CARLA_UTILS_HPP_INCLUDED | ||||
#include "CarlaDefines.hpp" | |||||
#include "CarlaDefines.h" | |||||
#include <cassert> | #include <cassert> | ||||
#include <cstdarg> | #include <cstdarg> | ||||