@@ -508,9 +508,10 @@ CARLA_EXPORT const EngineDriverDeviceInfo* carla_get_engine_driver_device_info(u | |||||
CARLA_EXPORT unsigned int carla_get_internal_plugin_count(); | CARLA_EXPORT unsigned int carla_get_internal_plugin_count(); | ||||
/*! | /*! | ||||
* Get information about the internal plugin \a internalPluginId. | |||||
* Get information about an internal plugin. | |||||
* @param index Internal plugin Id | |||||
*/ | */ | ||||
CARLA_EXPORT const CarlaNativePluginInfo* carla_get_internal_plugin_info(unsigned int internalPluginId); | |||||
CARLA_EXPORT const CarlaNativePluginInfo* carla_get_internal_plugin_info(unsigned int index); | |||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
/*! | /*! | ||||
@@ -23,7 +23,7 @@ | |||||
// Avoid including extra libs here | // Avoid including extra libs here | ||||
typedef void* lo_address; | typedef void* lo_address; | ||||
typedef struct _PluginDescriptor PluginDescriptor; | |||||
typedef struct _NativePluginDescriptor NativePluginDescriptor; | |||||
#ifndef LADSPA_RDF_HPP_INCLUDED | #ifndef LADSPA_RDF_HPP_INCLUDED | ||||
struct LADSPA_RDF_Descriptor; | struct LADSPA_RDF_Descriptor; | ||||
#endif | #endif | ||||
@@ -852,7 +852,7 @@ public: | |||||
}; | }; | ||||
static size_t getNativePluginCount(); | static size_t getNativePluginCount(); | ||||
static const PluginDescriptor* getNativePluginDescriptor(const size_t index); | |||||
static const NativePluginDescriptor* getNativePluginDescriptor(const size_t index); | |||||
static CarlaPlugin* newNative(const Initializer& init); | static CarlaPlugin* newNative(const Initializer& init); | ||||
static CarlaPlugin* newBridge(const Initializer& init, const BinaryType btype, const PluginType ptype, const char* const bridgeBinary); | static CarlaPlugin* newBridge(const Initializer& init, const BinaryType btype, const PluginType ptype, const char* const bridgeBinary); | ||||
@@ -120,8 +120,8 @@ public: | |||||
carla_debug("NativePlugin::NativePlugin(%p, %i)", engine, id); | carla_debug("NativePlugin::NativePlugin(%p, %i)", engine, id); | ||||
carla_fill<int32_t>(fCurMidiProgs, MAX_MIDI_CHANNELS, 0); | carla_fill<int32_t>(fCurMidiProgs, MAX_MIDI_CHANNELS, 0); | ||||
carla_zeroStruct< ::MidiEvent>(fMidiEvents, kPluginMaxMidiEvents*2); | |||||
carla_zeroStruct< ::TimeInfo>(fTimeInfo); | |||||
carla_zeroStruct<NativeMidiEvent>(fMidiEvents, kPluginMaxMidiEvents*2); | |||||
carla_zeroStruct<NativeTimeInfo>(fTimeInfo); | |||||
fHost.handle = this; | fHost.handle = this; | ||||
fHost.resourceDir = carla_strdup((const char*)engine->getOptions().resourceDir); | fHost.resourceDir = carla_strdup((const char*)engine->getOptions().resourceDir); | ||||
@@ -145,7 +145,7 @@ public: | |||||
carla_debug("NativePlugin::~NativePlugin()"); | carla_debug("NativePlugin::~NativePlugin()"); | ||||
// close UI | // close UI | ||||
if (fHints & PLUGIN_HAS_GUI) | |||||
if (fHints & PLUGIN_HAS_UI) | |||||
{ | { | ||||
if (fIsUiVisible && fDescriptor != nullptr && fDescriptor->ui_show != nullptr && fHandle != nullptr) | if (fIsUiVisible && fDescriptor != nullptr && fDescriptor->ui_show != nullptr && fHandle != nullptr) | ||||
fDescriptor->ui_show(fHandle, false); | fDescriptor->ui_show(fHandle, false); | ||||
@@ -230,7 +230,7 @@ public: | |||||
CARLA_SAFE_ASSERT_RETURN(fHandle != nullptr, 0); | CARLA_SAFE_ASSERT_RETURN(fHandle != nullptr, 0); | ||||
CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, 0); | CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, 0); | ||||
if (const Parameter* const param = fDescriptor->get_parameter_info(fHandle, parameterId)) | |||||
if (const NativeParameter* const param = fDescriptor->get_parameter_info(fHandle, parameterId)) | |||||
return param->scalePointCount; | return param->scalePointCount; | ||||
carla_safe_assert("const Parameter* const param = fDescriptor->get_parameter_info(fHandle, parameterId)", __FILE__, __LINE__); | carla_safe_assert("const Parameter* const param = fDescriptor->get_parameter_info(fHandle, parameterId)", __FILE__, __LINE__); | ||||
@@ -299,9 +299,9 @@ public: | |||||
CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, 0.0f); | CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, 0.0f); | ||||
CARLA_SAFE_ASSERT_RETURN(scalePointId < getParameterScalePointCount(parameterId), 0.0f); | CARLA_SAFE_ASSERT_RETURN(scalePointId < getParameterScalePointCount(parameterId), 0.0f); | ||||
if (const Parameter* const param = fDescriptor->get_parameter_info(fHandle, parameterId)) | |||||
if (const NativeParameter* const param = fDescriptor->get_parameter_info(fHandle, parameterId)) | |||||
{ | { | ||||
const ParameterScalePoint* scalePoint(¶m->scalePoints[scalePointId]); | |||||
const NativeParameterScalePoint* scalePoint(¶m->scalePoints[scalePointId]); | |||||
return scalePoint->value; | return scalePoint->value; | ||||
} | } | ||||
@@ -356,7 +356,7 @@ public: | |||||
CARLA_SAFE_ASSERT_RETURN(fHandle != nullptr,); | CARLA_SAFE_ASSERT_RETURN(fHandle != nullptr,); | ||||
CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,); | CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,); | ||||
if (const Parameter* const param = fDescriptor->get_parameter_info(fHandle, parameterId)) | |||||
if (const NativeParameter* const param = fDescriptor->get_parameter_info(fHandle, parameterId)) | |||||
{ | { | ||||
if (param->name != nullptr) | if (param->name != nullptr) | ||||
{ | { | ||||
@@ -398,7 +398,7 @@ public: | |||||
CARLA_SAFE_ASSERT_RETURN(fHandle != nullptr,); | CARLA_SAFE_ASSERT_RETURN(fHandle != nullptr,); | ||||
CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,); | CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,); | ||||
if (const Parameter* const param = fDescriptor->get_parameter_info(fHandle, parameterId)) | |||||
if (const NativeParameter* const param = fDescriptor->get_parameter_info(fHandle, parameterId)) | |||||
{ | { | ||||
if (param->unit != nullptr) | if (param->unit != nullptr) | ||||
{ | { | ||||
@@ -420,9 +420,9 @@ public: | |||||
CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,); | CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,); | ||||
CARLA_SAFE_ASSERT_RETURN(scalePointId < getParameterScalePointCount(parameterId),); | CARLA_SAFE_ASSERT_RETURN(scalePointId < getParameterScalePointCount(parameterId),); | ||||
if (const Parameter* const param = fDescriptor->get_parameter_info(fHandle, parameterId)) | |||||
if (const NativeParameter* const param = fDescriptor->get_parameter_info(fHandle, parameterId)) | |||||
{ | { | ||||
const ParameterScalePoint* scalePoint(¶m->scalePoints[scalePointId]); | |||||
const NativeParameterScalePoint* scalePoint(¶m->scalePoints[scalePointId]); | |||||
if (scalePoint->label != nullptr) | if (scalePoint->label != nullptr) | ||||
{ | { | ||||
@@ -889,12 +889,9 @@ public: | |||||
for (j=0; j < params; ++j) | for (j=0; j < params; ++j) | ||||
{ | { | ||||
const ::Parameter* const paramInfo(fDescriptor->get_parameter_info(fHandle, j)); | |||||
const NativeParameter* const paramInfo(fDescriptor->get_parameter_info(fHandle, j)); | |||||
CARLA_ASSERT(paramInfo != nullptr); | |||||
if (paramInfo == nullptr) | |||||
continue; | |||||
CARLA_SAFE_ASSERT_CONTINUE(paramInfo != nullptr); | |||||
pData->param.data[j].index = j; | pData->param.data[j].index = j; | ||||
pData->param.data[j].rindex = j; | pData->param.data[j].rindex = j; | ||||
@@ -1045,8 +1042,10 @@ public: | |||||
// native plugin hints | // native plugin hints | ||||
if (fDescriptor->hints & ::PLUGIN_IS_RTSAFE) | if (fDescriptor->hints & ::PLUGIN_IS_RTSAFE) | ||||
fHints |= PLUGIN_IS_RTSAFE; | fHints |= PLUGIN_IS_RTSAFE; | ||||
if (fDescriptor->hints & ::PLUGIN_HAS_GUI) | |||||
fHints |= PLUGIN_HAS_GUI; | |||||
if (fDescriptor->hints & ::PLUGIN_IS_SYNTH) | |||||
fHints |= PLUGIN_IS_SYNTH; | |||||
if (fDescriptor->hints & ::PLUGIN_HAS_UI) | |||||
fHints |= PLUGIN_HAS_CUSTOM_UI; | |||||
if (fDescriptor->hints & ::PLUGIN_NEEDS_SINGLE_THREAD) | if (fDescriptor->hints & ::PLUGIN_NEEDS_SINGLE_THREAD) | ||||
fHints |= PLUGIN_NEEDS_SINGLE_THREAD; | fHints |= PLUGIN_NEEDS_SINGLE_THREAD; | ||||
if (fDescriptor->hints & ::PLUGIN_NEEDS_FIXED_BUFFERS) | if (fDescriptor->hints & ::PLUGIN_NEEDS_FIXED_BUFFERS) | ||||
@@ -1088,7 +1087,7 @@ public: | |||||
// Update data | // Update data | ||||
for (i=0; i < count; ++i) | for (i=0; i < count; ++i) | ||||
{ | { | ||||
const ::MidiProgram* const mpDesc = fDescriptor->get_midi_program_info(fHandle, i); | |||||
const NativeMidiProgram* const mpDesc(fDescriptor->get_midi_program_info(fHandle, i)); | |||||
CARLA_ASSERT(mpDesc != nullptr); | CARLA_ASSERT(mpDesc != nullptr); | ||||
CARLA_ASSERT(mpDesc->name != nullptr); | CARLA_ASSERT(mpDesc->name != nullptr); | ||||
@@ -1209,7 +1208,7 @@ public: | |||||
} | } | ||||
fMidiEventCount = 0; | fMidiEventCount = 0; | ||||
carla_zeroStruct< ::MidiEvent>(fMidiEvents, kPluginMaxMidiEvents*2); | |||||
carla_zeroStruct<NativeMidiEvent>(fMidiEvents, kPluginMaxMidiEvents*2); | |||||
// -------------------------------------------------------------------------------------------------------- | // -------------------------------------------------------------------------------------------------------- | ||||
// Check if needs reset | // Check if needs reset | ||||
@@ -1348,7 +1347,7 @@ public: | |||||
if (fMidiEventCount > 0) | if (fMidiEventCount > 0) | ||||
{ | { | ||||
carla_zeroStruct< ::MidiEvent>(fMidiEvents, fMidiEventCount); | |||||
carla_zeroStruct<NativeMidiEvent>(fMidiEvents, fMidiEventCount); | |||||
fMidiEventCount = 0; | fMidiEventCount = 0; | ||||
} | } | ||||
} | } | ||||
@@ -2011,14 +2010,14 @@ protected: | |||||
return pData->engine->isOffline(); | return pData->engine->isOffline(); | ||||
} | } | ||||
const ::TimeInfo* handleGetTimeInfo() const | |||||
const NativeTimeInfo* handleGetTimeInfo() const | |||||
{ | { | ||||
CARLA_SAFE_ASSERT_RETURN(fIsProcessing, nullptr); | CARLA_SAFE_ASSERT_RETURN(fIsProcessing, nullptr); | ||||
return &fTimeInfo; | return &fTimeInfo; | ||||
} | } | ||||
bool handleWriteMidiEvent(const ::MidiEvent* const event) | |||||
bool handleWriteMidiEvent(const NativeMidiEvent* const event) | |||||
{ | { | ||||
CARLA_ASSERT(fEnabled); | CARLA_ASSERT(fEnabled); | ||||
CARLA_ASSERT(fIsProcessing); | CARLA_ASSERT(fIsProcessing); | ||||
@@ -2045,7 +2044,7 @@ protected: | |||||
{ | { | ||||
if (fMidiEvents[i].data[0] == 0) | if (fMidiEvents[i].data[0] == 0) | ||||
{ | { | ||||
std::memcpy(&fMidiEvents[i], event, sizeof(::MidiEvent)); | |||||
std::memcpy(&fMidiEvents[i], event, sizeof(NativeMidiEvent)); | |||||
return true; | return true; | ||||
} | } | ||||
} | } | ||||
@@ -2091,7 +2090,7 @@ protected: | |||||
return retStr.isNotEmpty() ? (const char*)retStr : nullptr; | return retStr.isNotEmpty() ? (const char*)retStr : nullptr; | ||||
} | } | ||||
intptr_t handleDispatcher(const ::HostDispatcherOpcode opcode, const int32_t index, const intptr_t value, void* const ptr, const float opt) | |||||
intptr_t handleDispatcher(const NativeHostDispatcherOpcode opcode, const int32_t index, const intptr_t value, void* const ptr, const float opt) | |||||
{ | { | ||||
carla_debug("NativePlugin::handleDispatcher(%i, %i, " P_INTPTR ", %p, %f)", opcode, index, value, ptr, opt); | carla_debug("NativePlugin::handleDispatcher(%i, %i, " P_INTPTR ", %p, %f)", opcode, index, value, ptr, opt); | ||||
@@ -2163,7 +2162,7 @@ public: | |||||
return sPluginDescriptors.count(); | return sPluginDescriptors.count(); | ||||
} | } | ||||
static const ::PluginDescriptor* getPluginDescriptor(const size_t index) | |||||
static const NativePluginDescriptor* getPluginDescriptor(const size_t index) | |||||
{ | { | ||||
CARLA_ASSERT(index < sPluginDescriptors.count()); | CARLA_ASSERT(index < sPluginDescriptors.count()); | ||||
@@ -2173,7 +2172,7 @@ public: | |||||
return nullptr; | return nullptr; | ||||
} | } | ||||
static void registerPlugin(const ::PluginDescriptor* desc) | |||||
static void registerPlugin(const NativePluginDescriptor* desc) | |||||
{ | { | ||||
sPluginDescriptors.append(desc); | sPluginDescriptors.append(desc); | ||||
} | } | ||||
@@ -2205,7 +2204,7 @@ public: | |||||
// --------------------------------------------------------------- | // --------------------------------------------------------------- | ||||
// get descriptor that matches label | // get descriptor that matches label | ||||
for (List<const ::PluginDescriptor*>::Itenerator it = sPluginDescriptors.begin(); it.valid(); it.next()) | |||||
for (List<const NativePluginDescriptor*>::Itenerator it = sPluginDescriptors.begin(); it.valid(); it.next()) | |||||
{ | { | ||||
fDescriptor = *it; | fDescriptor = *it; | ||||
@@ -2343,83 +2342,83 @@ public: | |||||
}; | }; | ||||
private: | private: | ||||
::PluginHandle fHandle; | |||||
::PluginHandle fHandle2; | |||||
::HostDescriptor fHost; | |||||
const ::PluginDescriptor* fDescriptor; | |||||
NativePluginHandle fHandle; | |||||
NativePluginHandle fHandle2; | |||||
NativeHostDescriptor fHost; | |||||
const NativePluginDescriptor* fDescriptor; | |||||
bool fIsProcessing; | bool fIsProcessing; | ||||
bool fIsUiVisible; | bool fIsUiVisible; | ||||
float** fAudioInBuffers; | |||||
float** fAudioOutBuffers; | |||||
uint32_t fMidiEventCount; | |||||
::MidiEvent fMidiEvents[kPluginMaxMidiEvents*2]; | |||||
float** fAudioInBuffers; | |||||
float** fAudioOutBuffers; | |||||
uint32_t fMidiEventCount; | |||||
NativeMidiEvent fMidiEvents[kPluginMaxMidiEvents*2]; | |||||
int32_t fCurMidiProgs[MAX_MIDI_CHANNELS]; | int32_t fCurMidiProgs[MAX_MIDI_CHANNELS]; | ||||
NativePluginMidiData fMidiIn; | NativePluginMidiData fMidiIn; | ||||
NativePluginMidiData fMidiOut; | NativePluginMidiData fMidiOut; | ||||
::TimeInfo fTimeInfo; | |||||
NativeTimeInfo fTimeInfo; | |||||
static List<const ::PluginDescriptor*> sPluginDescriptors; | |||||
static List<const NativePluginDescriptor*> sPluginDescriptors; | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
#define handlePtr ((NativePlugin*)handle) | #define handlePtr ((NativePlugin*)handle) | ||||
static uint32_t carla_host_get_buffer_size(::HostHandle handle) | |||||
static uint32_t carla_host_get_buffer_size(NativeHostHandle handle) | |||||
{ | { | ||||
return handlePtr->handleGetBufferSize(); | return handlePtr->handleGetBufferSize(); | ||||
} | } | ||||
static double carla_host_get_sample_rate(::HostHandle handle) | |||||
static double carla_host_get_sample_rate(NativeHostHandle handle) | |||||
{ | { | ||||
return handlePtr->handleGetSampleRate(); | return handlePtr->handleGetSampleRate(); | ||||
} | } | ||||
static bool carla_host_is_offline(::HostHandle handle) | |||||
static bool carla_host_is_offline(NativeHostHandle handle) | |||||
{ | { | ||||
return handlePtr->handleIsOffline(); | return handlePtr->handleIsOffline(); | ||||
} | } | ||||
static const ::TimeInfo* carla_host_get_time_info(::HostHandle handle) | |||||
static const NativeTimeInfo* carla_host_get_time_info(NativeHostHandle handle) | |||||
{ | { | ||||
return handlePtr->handleGetTimeInfo(); | return handlePtr->handleGetTimeInfo(); | ||||
} | } | ||||
static bool carla_host_write_midi_event(::HostHandle handle, const ::MidiEvent* event) | |||||
static bool carla_host_write_midi_event(NativeHostHandle handle, const NativeMidiEvent* event) | |||||
{ | { | ||||
return handlePtr->handleWriteMidiEvent(event); | return handlePtr->handleWriteMidiEvent(event); | ||||
} | } | ||||
static void carla_host_ui_parameter_changed(::HostHandle handle, uint32_t index, float value) | |||||
static void carla_host_ui_parameter_changed(NativeHostHandle handle, uint32_t index, float value) | |||||
{ | { | ||||
handlePtr->handleUiParameterChanged(index, value); | handlePtr->handleUiParameterChanged(index, value); | ||||
} | } | ||||
static void carla_host_ui_custom_data_changed(::HostHandle handle, const char* key, const char* value) | |||||
static void carla_host_ui_custom_data_changed(NativeHostHandle handle, const char* key, const char* value) | |||||
{ | { | ||||
handlePtr->handleUiCustomDataChanged(key, value); | handlePtr->handleUiCustomDataChanged(key, value); | ||||
} | } | ||||
static void carla_host_ui_closed(::HostHandle handle) | |||||
static void carla_host_ui_closed(NativeHostHandle handle) | |||||
{ | { | ||||
handlePtr->handleUiClosed(); | handlePtr->handleUiClosed(); | ||||
} | } | ||||
static const char* carla_host_ui_open_file(::HostHandle handle, bool isDir, const char* title, const char* filter) | |||||
static const char* carla_host_ui_open_file(NativeHostHandle handle, bool isDir, const char* title, const char* filter) | |||||
{ | { | ||||
return handlePtr->handleUiOpenFile(isDir, title, filter); | return handlePtr->handleUiOpenFile(isDir, title, filter); | ||||
} | } | ||||
static const char* carla_host_ui_save_file(::HostHandle handle, bool isDir, const char* title, const char* filter) | |||||
static const char* carla_host_ui_save_file(NativeHostHandle handle, bool isDir, const char* title, const char* filter) | |||||
{ | { | ||||
return handlePtr->handleUiSaveFile(isDir, title, filter); | return handlePtr->handleUiSaveFile(isDir, title, filter); | ||||
} | } | ||||
static intptr_t carla_host_dispatcher(::HostHandle handle, ::HostDispatcherOpcode opcode, int32_t index, intptr_t value, void* ptr, float opt) | |||||
static intptr_t carla_host_dispatcher(NativeHostHandle handle, NativeHostDispatcherOpcode opcode, int32_t index, intptr_t value, void* ptr, float opt) | |||||
{ | { | ||||
return handlePtr->handleDispatcher(opcode, index, value, ptr, opt); | return handlePtr->handleDispatcher(opcode, index, value, ptr, opt); | ||||
} | } | ||||
@@ -2429,13 +2428,13 @@ private: | |||||
CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(NativePlugin) | CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(NativePlugin) | ||||
}; | }; | ||||
List<const ::PluginDescriptor*> NativePlugin::sPluginDescriptors; | |||||
List<const NativePluginDescriptor*> NativePlugin::sPluginDescriptors; | |||||
static const NativePlugin::ScopedInitializer _si; | static const NativePlugin::ScopedInitializer _si; | ||||
CARLA_BACKEND_END_NAMESPACE | CARLA_BACKEND_END_NAMESPACE | ||||
void carla_register_native_plugin(const PluginDescriptor* desc) | |||||
void carla_register_native_plugin(const NativePluginDescriptor* desc) | |||||
{ | { | ||||
CARLA_BACKEND_USE_NAMESPACE | CARLA_BACKEND_USE_NAMESPACE | ||||
NativePlugin::registerPlugin(desc); | NativePlugin::registerPlugin(desc); | ||||
@@ -2455,7 +2454,7 @@ size_t CarlaPlugin::getNativePluginCount() | |||||
return NativePlugin::getPluginCount(); | return NativePlugin::getPluginCount(); | ||||
} | } | ||||
const PluginDescriptor* CarlaPlugin::getNativePluginDescriptor(const size_t index) | |||||
const NativePluginDescriptor* CarlaPlugin::getNativePluginDescriptor(const size_t index) | |||||
{ | { | ||||
return NativePlugin::getPluginDescriptor(index); | return NativePlugin::getPluginDescriptor(index); | ||||
} | } | ||||
@@ -24,7 +24,7 @@ | |||||
#include "CarlaBackendUtils.hpp" | #include "CarlaBackendUtils.hpp" | ||||
//#include "CarlaOscUtils.hpp" | //#include "CarlaOscUtils.hpp" | ||||
//#include "CarlaNative.h" | |||||
#include "CarlaNative.h" | |||||
#ifdef USE_JUCE | #ifdef USE_JUCE | ||||
# include "juce_gui_basics.h" | # include "juce_gui_basics.h" | ||||
@@ -304,7 +304,6 @@ const EngineDriverDeviceInfo* carla_get_engine_driver_device_info(unsigned int i | |||||
return CarlaEngine::getDriverDeviceInfo(index, name); | return CarlaEngine::getDriverDeviceInfo(index, name); | ||||
} | } | ||||
#if 0 | |||||
// ------------------------------------------------------------------------------------------------------------------- | // ------------------------------------------------------------------------------------------------------------------- | ||||
unsigned int carla_get_internal_plugin_count() | unsigned int carla_get_internal_plugin_count() | ||||
@@ -318,29 +317,27 @@ unsigned int carla_get_internal_plugin_count() | |||||
#endif | #endif | ||||
} | } | ||||
const CarlaNativePluginInfo* carla_get_internal_plugin_info(unsigned int internalPluginId) | |||||
const CarlaNativePluginInfo* carla_get_internal_plugin_info(unsigned int index) | |||||
{ | { | ||||
carla_debug("carla_get_internal_plugin_info(%i)", internalPluginId); | |||||
carla_debug("carla_get_internal_plugin_info(%i)", index); | |||||
#ifdef WANT_NATIVE | |||||
static CarlaNativePluginInfo info; | static CarlaNativePluginInfo info; | ||||
#ifdef WANT_NATIVE | |||||
const PluginDescriptor* const nativePlugin(CarlaPlugin::getNativePluginDescriptor(internalPluginId)); | |||||
const NativePluginDescriptor* const nativePlugin(CarlaPlugin::getNativePluginDescriptor(index)); | |||||
// as internal plugin, this must never fail | // as internal plugin, this must never fail | ||||
CARLA_SAFE_ASSERT_RETURN(nativePlugin != nullptr, nullptr); | CARLA_SAFE_ASSERT_RETURN(nativePlugin != nullptr, nullptr); | ||||
info.category = static_cast<CarlaPluginCategory>(nativePlugin->category); | |||||
info.category = static_cast<CB::PluginCategory>(nativePlugin->category); | |||||
info.hints = 0x0; | info.hints = 0x0; | ||||
if (nativePlugin->hints & PLUGIN_IS_RTSAFE) | |||||
if (nativePlugin->hints & ::PLUGIN_IS_RTSAFE) | |||||
info.hints |= CB::PLUGIN_IS_RTSAFE; | info.hints |= CB::PLUGIN_IS_RTSAFE; | ||||
if (nativePlugin->hints & PLUGIN_HAS_GUI) | |||||
info.hints |= CB::PLUGIN_HAS_GUI; | |||||
if (nativePlugin->hints & PLUGIN_NEEDS_SINGLE_THREAD) | |||||
info.hints |= CB::PLUGIN_NEEDS_SINGLE_THREAD; | |||||
if (nativePlugin->hints & PLUGIN_NEEDS_FIXED_BUFFERS) | |||||
info.hints |= CB::PLUGIN_NEEDS_FIXED_BUFFERS; | |||||
if (nativePlugin->hints & ::PLUGIN_IS_SYNTH) | |||||
info.hints |= CB::PLUGIN_IS_SYNTH; | |||||
if (nativePlugin->hints & ::PLUGIN_HAS_UI) | |||||
info.hints |= CB::PLUGIN_HAS_CUSTOM_UI; | |||||
info.audioIns = nativePlugin->audioIns; | info.audioIns = nativePlugin->audioIns; | ||||
info.audioOuts = nativePlugin->audioOuts; | info.audioOuts = nativePlugin->audioOuts; | ||||
@@ -353,17 +350,17 @@ const CarlaNativePluginInfo* carla_get_internal_plugin_info(unsigned int interna | |||||
info.label = nativePlugin->label; | info.label = nativePlugin->label; | ||||
info.maker = nativePlugin->maker; | info.maker = nativePlugin->maker; | ||||
info.copyright = nativePlugin->copyright; | info.copyright = nativePlugin->copyright; | ||||
#endif | |||||
return &info; | return &info; | ||||
#else | |||||
return nullptr; | |||||
#ifndef WANT_NATIVE | |||||
// unused | // unused | ||||
(void)internalPluginId; | |||||
(void)index; | |||||
#endif | #endif | ||||
} | } | ||||
#endif | |||||
#if 0 | |||||
// ------------------------------------------------------------------------------------------------------------------- | // ------------------------------------------------------------------------------------------------------------------- | ||||
bool carla_engine_init(const char* driverName, const char* clientName) | bool carla_engine_init(const char* driverName, const char* clientName) | ||||
@@ -896,6 +893,7 @@ const CarlaTransportInfo* carla_get_transport_info() | |||||
return &info; | return &info; | ||||
} | } | ||||
#endif | #endif | ||||
#endif | |||||
// ------------------------------------------------------------------------------------------------------------------- | // ------------------------------------------------------------------------------------------------------------------- | ||||
@@ -33,28 +33,29 @@ extern "C" { | |||||
* @{ | * @{ | ||||
*/ | */ | ||||
typedef void* HostHandle; | |||||
typedef void* PluginHandle; | |||||
typedef void* NativeHostHandle; | |||||
typedef void* NativePluginHandle; | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
// enums | // enums | ||||
typedef enum { | typedef enum { | ||||
PLUGIN_CATEGORY_NONE = 0, //!< Null plugin category. | |||||
PLUGIN_CATEGORY_SYNTH = 1, //!< A synthesizer or generator. | |||||
PLUGIN_CATEGORY_DELAY = 2, //!< A delay or reverberator. | |||||
PLUGIN_CATEGORY_EQ = 3, //!< An equalizer. | |||||
PLUGIN_CATEGORY_FILTER = 4, //!< A filter. | |||||
PLUGIN_CATEGORY_DYNAMICS = 5, //!< A 'dynamic' plugin (amplifier, compressor, gate, etc). | |||||
PLUGIN_CATEGORY_MODULATOR = 6, //!< A 'modulator' plugin (chorus, flanger, phaser, etc). | |||||
PLUGIN_CATEGORY_UTILITY = 7, //!< An 'utility' plugin (analyzer, converter, mixer, etc). | |||||
PLUGIN_CATEGORY_OTHER = 8 //!< Misc plugin (used to check if the plugin has a category). | |||||
} PluginCategory; | |||||
PLUGIN_CATEGORY_NONE = 0, //!< Null plugin category. | |||||
PLUGIN_CATEGORY_SYNTH = 1, //!< A synthesizer or generator. | |||||
PLUGIN_CATEGORY_DELAY = 2, //!< A delay or reverberator. | |||||
PLUGIN_CATEGORY_EQ = 3, //!< An equalizer. | |||||
PLUGIN_CATEGORY_FILTER = 4, //!< A filter. | |||||
PLUGIN_CATEGORY_DISTORTION = 5, //!< A distortion plugin. | |||||
PLUGIN_CATEGORY_DYNAMICS = 6, //!< A 'dynamic' plugin (amplifier, compressor, gate, etc). | |||||
PLUGIN_CATEGORY_MODULATOR = 7, //!< A 'modulator' plugin (chorus, flanger, phaser, etc). | |||||
PLUGIN_CATEGORY_UTILITY = 8, //!< An 'utility' plugin (analyzer, converter, mixer, etc). | |||||
PLUGIN_CATEGORY_OTHER = 9 //!< Misc plugin (used to check if the plugin has a category). | |||||
} NativePluginCategory; | |||||
typedef enum { | typedef enum { | ||||
PLUGIN_IS_RTSAFE = 1 << 0, | PLUGIN_IS_RTSAFE = 1 << 0, | ||||
PLUGIN_IS_SYNTH = 1 << 1, | PLUGIN_IS_SYNTH = 1 << 1, | ||||
PLUGIN_HAS_GUI = 1 << 2, | |||||
PLUGIN_HAS_UI = 1 << 2, | |||||
PLUGIN_NEEDS_FIXED_BUFFERS = 1 << 3, | PLUGIN_NEEDS_FIXED_BUFFERS = 1 << 3, | ||||
PLUGIN_NEEDS_SINGLE_THREAD = 1 << 4, | PLUGIN_NEEDS_SINGLE_THREAD = 1 << 4, | ||||
PLUGIN_NEEDS_UI_JUCE = 1 << 5, | PLUGIN_NEEDS_UI_JUCE = 1 << 5, | ||||
@@ -62,7 +63,7 @@ typedef enum { | |||||
PLUGIN_USES_PANNING = 1 << 7, // uses stereo balance if unset (default) | PLUGIN_USES_PANNING = 1 << 7, // uses stereo balance if unset (default) | ||||
PLUGIN_USES_STATE = 1 << 8, | PLUGIN_USES_STATE = 1 << 8, | ||||
PLUGIN_USES_TIME = 1 << 9 | PLUGIN_USES_TIME = 1 << 9 | ||||
} PluginHints; | |||||
} NativePluginHints; | |||||
typedef enum { | typedef enum { | ||||
PLUGIN_SUPPORTS_PROGRAM_CHANGES = 1 << 0, // handles MIDI programs internally instead of host-exposed/exported | PLUGIN_SUPPORTS_PROGRAM_CHANGES = 1 << 0, // handles MIDI programs internally instead of host-exposed/exported | ||||
@@ -72,7 +73,7 @@ typedef enum { | |||||
PLUGIN_SUPPORTS_PITCHBEND = 1 << 4, | PLUGIN_SUPPORTS_PITCHBEND = 1 << 4, | ||||
PLUGIN_SUPPORTS_ALL_SOUND_OFF = 1 << 5, | PLUGIN_SUPPORTS_ALL_SOUND_OFF = 1 << 5, | ||||
PLUGIN_SUPPORTS_EVERYTHING = (1 << 6)-1 | PLUGIN_SUPPORTS_EVERYTHING = (1 << 6)-1 | ||||
} PluginSupports; | |||||
} NativePluginSupports; | |||||
typedef enum { | typedef enum { | ||||
PARAMETER_IS_OUTPUT = 1 << 0, | PARAMETER_IS_OUTPUT = 1 << 0, | ||||
@@ -84,7 +85,7 @@ typedef enum { | |||||
PARAMETER_USES_SAMPLE_RATE = 1 << 6, | PARAMETER_USES_SAMPLE_RATE = 1 << 6, | ||||
PARAMETER_USES_SCALEPOINTS = 1 << 7, | PARAMETER_USES_SCALEPOINTS = 1 << 7, | ||||
PARAMETER_USES_CUSTOM_TEXT = 1 << 8 | PARAMETER_USES_CUSTOM_TEXT = 1 << 8 | ||||
} ParameterHints; | |||||
} NativeParameterHints; | |||||
typedef enum { | typedef enum { | ||||
PLUGIN_OPCODE_NULL = 0, // nothing | PLUGIN_OPCODE_NULL = 0, // nothing | ||||
@@ -92,7 +93,7 @@ typedef enum { | |||||
PLUGIN_OPCODE_SAMPLE_RATE_CHANGED = 2, // uses opt | PLUGIN_OPCODE_SAMPLE_RATE_CHANGED = 2, // uses opt | ||||
PLUGIN_OPCODE_OFFLINE_CHANGED = 3, // uses value (0=off, 1=on) | PLUGIN_OPCODE_OFFLINE_CHANGED = 3, // uses value (0=off, 1=on) | ||||
PLUGIN_OPCODE_UI_NAME_CHANGED = 4 // uses ptr | PLUGIN_OPCODE_UI_NAME_CHANGED = 4 // uses ptr | ||||
} PluginDispatcherOpcode; | |||||
} NativePluginDispatcherOpcode; | |||||
typedef enum { | typedef enum { | ||||
HOST_OPCODE_NULL = 0, // nothing | HOST_OPCODE_NULL = 0, // nothing | ||||
@@ -110,7 +111,7 @@ typedef enum { | |||||
HOST_OPCODE_RELOAD_MIDI_PROGRAMS = 12, // nothing | HOST_OPCODE_RELOAD_MIDI_PROGRAMS = 12, // nothing | ||||
HOST_OPCODE_RELOAD_ALL = 13, // nothing | HOST_OPCODE_RELOAD_ALL = 13, // nothing | ||||
HOST_OPCODE_UI_UNAVAILABLE = 14 // nothing | HOST_OPCODE_UI_UNAVAILABLE = 14 // nothing | ||||
} HostDispatcherOpcode; | |||||
} NativeHostDispatcherOpcode; | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
// base structs | // base structs | ||||
@@ -118,7 +119,7 @@ typedef enum { | |||||
typedef struct { | typedef struct { | ||||
const char* label; | const char* label; | ||||
float value; | float value; | ||||
} ParameterScalePoint; | |||||
} NativeParameterScalePoint; | |||||
typedef struct { | typedef struct { | ||||
float def; | float def; | ||||
@@ -127,34 +128,34 @@ typedef struct { | |||||
float step; | float step; | ||||
float stepSmall; | float stepSmall; | ||||
float stepLarge; | float stepLarge; | ||||
} ParameterRanges; | |||||
} NativeParameterRanges; | |||||
#define PARAMETER_RANGES_DEFAULT_STEP 0.01f | #define PARAMETER_RANGES_DEFAULT_STEP 0.01f | ||||
#define PARAMETER_RANGES_DEFAULT_STEP_SMALL 0.0001f | #define PARAMETER_RANGES_DEFAULT_STEP_SMALL 0.0001f | ||||
#define PARAMETER_RANGES_DEFAULT_STEP_LARGE 0.1f | #define PARAMETER_RANGES_DEFAULT_STEP_LARGE 0.1f | ||||
typedef struct { | typedef struct { | ||||
ParameterHints hints; | |||||
NativeParameterHints hints; | |||||
const char* name; | const char* name; | ||||
const char* unit; | const char* unit; | ||||
ParameterRanges ranges; | |||||
NativeParameterRanges ranges; | |||||
uint32_t scalePointCount; | uint32_t scalePointCount; | ||||
ParameterScalePoint* scalePoints; | |||||
} Parameter; | |||||
NativeParameterScalePoint* scalePoints; | |||||
} NativeParameter; | |||||
typedef struct { | typedef struct { | ||||
uint8_t port; | uint8_t port; | ||||
uint32_t time; | uint32_t time; | ||||
uint8_t data[4]; | uint8_t data[4]; | ||||
uint8_t size; | uint8_t size; | ||||
} MidiEvent; | |||||
} NativeMidiEvent; | |||||
typedef struct { | typedef struct { | ||||
uint32_t bank; | uint32_t bank; | ||||
uint32_t program; | uint32_t program; | ||||
const char* name; | const char* name; | ||||
} MidiProgram; | |||||
} NativeMidiProgram; | |||||
typedef struct { | typedef struct { | ||||
bool valid; | bool valid; | ||||
@@ -169,49 +170,49 @@ typedef struct { | |||||
double ticksPerBeat; | double ticksPerBeat; | ||||
double beatsPerMinute; | double beatsPerMinute; | ||||
} TimeInfoBBT; | |||||
} NativeTimeInfoBBT; | |||||
typedef struct { | typedef struct { | ||||
bool playing; | bool playing; | ||||
uint64_t frame; | uint64_t frame; | ||||
uint64_t usecs; | uint64_t usecs; | ||||
TimeInfoBBT bbt; | |||||
} TimeInfo; | |||||
NativeTimeInfoBBT bbt; | |||||
} NativeTimeInfo; | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
// HostDescriptor | // HostDescriptor | ||||
typedef struct { | typedef struct { | ||||
HostHandle handle; | |||||
NativeHostHandle handle; | |||||
const char* resourceDir; | const char* resourceDir; | ||||
const char* uiName; | const char* uiName; | ||||
uint32_t (*get_buffer_size)(HostHandle handle); | |||||
double (*get_sample_rate)(HostHandle handle); | |||||
bool (*is_offline)(HostHandle handle); | |||||
uint32_t (*get_buffer_size)(NativeHostHandle handle); | |||||
double (*get_sample_rate)(NativeHostHandle handle); | |||||
bool (*is_offline)(NativeHostHandle handle); | |||||
const TimeInfo* (*get_time_info)(HostHandle handle); | |||||
bool (*write_midi_event)(HostHandle handle, const MidiEvent* event); | |||||
const NativeTimeInfo* (*get_time_info)(NativeHostHandle handle); | |||||
bool (*write_midi_event)(NativeHostHandle handle, const NativeMidiEvent* event); | |||||
void (*ui_parameter_changed)(HostHandle handle, uint32_t index, float value); | |||||
void (*ui_midi_program_changed)(HostHandle handle, uint8_t channel, uint32_t bank, uint32_t program); | |||||
void (*ui_custom_data_changed)(HostHandle handle, const char* key, const char* value); | |||||
void (*ui_closed)(HostHandle handle); | |||||
void (*ui_parameter_changed)(NativeHostHandle handle, uint32_t index, float value); | |||||
void (*ui_midi_program_changed)(NativeHostHandle handle, uint8_t channel, uint32_t bank, uint32_t program); | |||||
void (*ui_custom_data_changed)(NativeHostHandle handle, const char* key, const char* value); | |||||
void (*ui_closed)(NativeHostHandle handle); | |||||
const char* (*ui_open_file)(HostHandle handle, bool isDir, const char* title, const char* filter); | |||||
const char* (*ui_save_file)(HostHandle handle, bool isDir, const char* title, const char* filter); | |||||
const char* (*ui_open_file)(NativeHostHandle handle, bool isDir, const char* title, const char* filter); | |||||
const char* (*ui_save_file)(NativeHostHandle handle, bool isDir, const char* title, const char* filter); | |||||
intptr_t (*dispatcher)(HostHandle handle, HostDispatcherOpcode opcode, int32_t index, intptr_t value, void* ptr, float opt); | |||||
intptr_t (*dispatcher)(NativeHostHandle handle, NativeHostDispatcherOpcode opcode, int32_t index, intptr_t value, void* ptr, float opt); | |||||
} HostDescriptor; | |||||
} NativeHostDescriptor; | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
// PluginDescriptor | // PluginDescriptor | ||||
typedef struct _PluginDescriptor { | |||||
const PluginCategory category; | |||||
const PluginHints hints; | |||||
const PluginSupports supports; | |||||
typedef struct _NativePluginDescriptor { | |||||
const NativePluginCategory category; | |||||
const NativePluginHints hints; | |||||
const NativePluginSupports supports; | |||||
const uint32_t audioIns; | const uint32_t audioIns; | ||||
const uint32_t audioOuts; | const uint32_t audioOuts; | ||||
const uint32_t midiIns; | const uint32_t midiIns; | ||||
@@ -223,44 +224,44 @@ typedef struct _PluginDescriptor { | |||||
const char* const maker; | const char* const maker; | ||||
const char* const copyright; | const char* const copyright; | ||||
PluginHandle (*instantiate)(const HostDescriptor* host); | |||||
void (*cleanup)(PluginHandle handle); | |||||
NativePluginHandle (*instantiate)(const NativeHostDescriptor* host); | |||||
void (*cleanup)(NativePluginHandle handle); | |||||
uint32_t (*get_parameter_count)(PluginHandle handle); | |||||
const Parameter* (*get_parameter_info)(PluginHandle handle, uint32_t index); | |||||
float (*get_parameter_value)(PluginHandle handle, uint32_t index); | |||||
const char* (*get_parameter_text)(PluginHandle handle, uint32_t index, float value); | |||||
uint32_t (*get_parameter_count)(NativePluginHandle handle); | |||||
const NativeParameter* (*get_parameter_info)(NativePluginHandle handle, uint32_t index); | |||||
float (*get_parameter_value)(NativePluginHandle handle, uint32_t index); | |||||
const char* (*get_parameter_text)(NativePluginHandle handle, uint32_t index, float value); | |||||
uint32_t (*get_midi_program_count)(PluginHandle handle); | |||||
const MidiProgram* (*get_midi_program_info)(PluginHandle handle, uint32_t index); | |||||
uint32_t (*get_midi_program_count)(NativePluginHandle handle); | |||||
const NativeMidiProgram* (*get_midi_program_info)(NativePluginHandle handle, uint32_t index); | |||||
void (*set_parameter_value)(PluginHandle handle, uint32_t index, float value); | |||||
void (*set_midi_program)(PluginHandle handle, uint8_t channel, uint32_t bank, uint32_t program); | |||||
void (*set_custom_data)(PluginHandle handle, const char* key, const char* value); | |||||
void (*set_parameter_value)(NativePluginHandle handle, uint32_t index, float value); | |||||
void (*set_midi_program)(NativePluginHandle handle, uint8_t channel, uint32_t bank, uint32_t program); | |||||
void (*set_custom_data)(NativePluginHandle handle, const char* key, const char* value); | |||||
void (*ui_show)(PluginHandle handle, bool show); | |||||
void (*ui_idle)(PluginHandle handle); | |||||
void (*ui_show)(NativePluginHandle handle, bool show); | |||||
void (*ui_idle)(NativePluginHandle handle); | |||||
void (*ui_set_parameter_value)(PluginHandle handle, uint32_t index, float value); | |||||
void (*ui_set_midi_program)(PluginHandle handle, uint8_t channel, uint32_t bank, uint32_t program); | |||||
void (*ui_set_custom_data)(PluginHandle handle, const char* key, const char* value); | |||||
void (*ui_set_parameter_value)(NativePluginHandle handle, uint32_t index, float value); | |||||
void (*ui_set_midi_program)(NativePluginHandle handle, uint8_t channel, uint32_t bank, uint32_t program); | |||||
void (*ui_set_custom_data)(NativePluginHandle handle, const char* key, const char* value); | |||||
void (*activate)(PluginHandle handle); | |||||
void (*deactivate)(PluginHandle handle); | |||||
void (*process)(PluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const MidiEvent* midiEvents, uint32_t midiEventCount); | |||||
void (*activate)(NativePluginHandle handle); | |||||
void (*deactivate)(NativePluginHandle handle); | |||||
void (*process)(NativePluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const NativeMidiEvent* midiEvents, uint32_t midiEventCount); | |||||
char* (*get_state)(PluginHandle handle); | |||||
void (*set_state)(PluginHandle handle, const char* data); | |||||
char* (*get_state)(NativePluginHandle handle); | |||||
void (*set_state)(NativePluginHandle handle, const char* data); | |||||
intptr_t (*dispatcher)(PluginHandle handle, PluginDispatcherOpcode opcode, int32_t index, intptr_t value, void* ptr, float opt); | |||||
intptr_t (*dispatcher)(NativePluginHandle handle, NativePluginDispatcherOpcode opcode, int32_t index, intptr_t value, void* ptr, float opt); | |||||
} PluginDescriptor; | |||||
} NativePluginDescriptor; | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
// Register plugin | // Register plugin | ||||
// Implemented by host | // Implemented by host | ||||
extern void carla_register_native_plugin(const PluginDescriptor* desc); | |||||
extern void carla_register_native_plugin(const NativePluginDescriptor* desc); | |||||
// Called once on host init | // Called once on host init | ||||
void carla_register_all_plugins(); | void carla_register_all_plugins(); | ||||
@@ -30,16 +30,16 @@ | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
// Plugin Class | // Plugin Class | ||||
class PluginClass | |||||
class NativePluginClass | |||||
{ | { | ||||
public: | public: | ||||
PluginClass(const HostDescriptor* const host) | |||||
NativePluginClass(const NativeHostDescriptor* const host) | |||||
: pHost(host) | : pHost(host) | ||||
{ | { | ||||
CARLA_ASSERT(host != nullptr); | CARLA_ASSERT(host != nullptr); | ||||
} | } | ||||
virtual ~PluginClass() | |||||
virtual ~NativePluginClass() | |||||
{ | { | ||||
} | } | ||||
@@ -47,7 +47,7 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Host calls | // Host calls | ||||
const HostDescriptor* getHostHandle() const noexcept | |||||
const NativeHostDescriptor* getHostHandle() const noexcept | |||||
{ | { | ||||
return pHost; | return pHost; | ||||
} | } | ||||
@@ -87,14 +87,14 @@ protected: | |||||
return pHost->is_offline(pHost->handle); | return pHost->is_offline(pHost->handle); | ||||
} | } | ||||
const TimeInfo* getTimeInfo() const | |||||
const NativeTimeInfo* getTimeInfo() const | |||||
{ | { | ||||
CARLA_SAFE_ASSERT_RETURN(pHost != nullptr, nullptr); | CARLA_SAFE_ASSERT_RETURN(pHost != nullptr, nullptr); | ||||
return pHost->get_time_info(pHost->handle); | return pHost->get_time_info(pHost->handle); | ||||
} | } | ||||
void writeMidiEvent(const MidiEvent* const event) const | |||||
void writeMidiEvent(const NativeMidiEvent* const event) const | |||||
{ | { | ||||
CARLA_SAFE_ASSERT_RETURN(pHost != nullptr,); | CARLA_SAFE_ASSERT_RETURN(pHost != nullptr,); | ||||
@@ -266,7 +266,7 @@ protected: | |||||
return 0; | return 0; | ||||
} | } | ||||
virtual const Parameter* getParameterInfo(const uint32_t index) const | |||||
virtual const NativeParameter* getParameterInfo(const uint32_t index) const | |||||
{ | { | ||||
CARLA_SAFE_ASSERT_RETURN(index < getParameterCount(), nullptr); | CARLA_SAFE_ASSERT_RETURN(index < getParameterCount(), nullptr); | ||||
return nullptr; | return nullptr; | ||||
@@ -295,7 +295,7 @@ protected: | |||||
return 0; | return 0; | ||||
} | } | ||||
virtual const MidiProgram* getMidiProgramInfo(const uint32_t index) const | |||||
virtual const NativeMidiProgram* getMidiProgramInfo(const uint32_t index) const | |||||
{ | { | ||||
CARLA_SAFE_ASSERT_RETURN(index < getMidiProgramCount(), nullptr); | CARLA_SAFE_ASSERT_RETURN(index < getMidiProgramCount(), nullptr); | ||||
return nullptr; | return nullptr; | ||||
@@ -340,7 +340,7 @@ protected: | |||||
{ | { | ||||
} | } | ||||
virtual void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, const MidiEvent* const midiEvents, const uint32_t midiEventCount) = 0; | |||||
virtual void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, const NativeMidiEvent* const midiEvents, const uint32_t midiEventCount) = 0; | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Plugin UI calls | // Plugin UI calls | ||||
@@ -427,110 +427,110 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
private: | private: | ||||
const HostDescriptor* const pHost; | |||||
const NativeHostDescriptor* const pHost; | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
#ifndef DOXYGEN | #ifndef DOXYGEN | ||||
public: | public: | ||||
#define handlePtr ((PluginClass*)handle) | |||||
#define handlePtr ((NativePluginClass*)handle) | |||||
static uint32_t _get_parameter_count(PluginHandle handle) | |||||
static uint32_t _get_parameter_count(NativePluginHandle handle) | |||||
{ | { | ||||
return handlePtr->getParameterCount(); | return handlePtr->getParameterCount(); | ||||
} | } | ||||
static const Parameter* _get_parameter_info(PluginHandle handle, uint32_t index) | |||||
static const NativeParameter* _get_parameter_info(NativePluginHandle handle, uint32_t index) | |||||
{ | { | ||||
return handlePtr->getParameterInfo(index); | return handlePtr->getParameterInfo(index); | ||||
} | } | ||||
static float _get_parameter_value(PluginHandle handle, uint32_t index) | |||||
static float _get_parameter_value(NativePluginHandle handle, uint32_t index) | |||||
{ | { | ||||
return handlePtr->getParameterValue(index); | return handlePtr->getParameterValue(index); | ||||
} | } | ||||
static const char* _get_parameter_text(PluginHandle handle, uint32_t index, float value) | |||||
static const char* _get_parameter_text(NativePluginHandle handle, uint32_t index, float value) | |||||
{ | { | ||||
return handlePtr->getParameterText(index, value); | return handlePtr->getParameterText(index, value); | ||||
} | } | ||||
static uint32_t _get_midi_program_count(PluginHandle handle) | |||||
static uint32_t _get_midi_program_count(NativePluginHandle handle) | |||||
{ | { | ||||
return handlePtr->getMidiProgramCount(); | return handlePtr->getMidiProgramCount(); | ||||
} | } | ||||
static const MidiProgram* _get_midi_program_info(PluginHandle handle, uint32_t index) | |||||
static const NativeMidiProgram* _get_midi_program_info(NativePluginHandle handle, uint32_t index) | |||||
{ | { | ||||
return handlePtr->getMidiProgramInfo(index); | return handlePtr->getMidiProgramInfo(index); | ||||
} | } | ||||
static void _set_parameter_value(PluginHandle handle, uint32_t index, float value) | |||||
static void _set_parameter_value(NativePluginHandle handle, uint32_t index, float value) | |||||
{ | { | ||||
handlePtr->setParameterValue(index, value); | handlePtr->setParameterValue(index, value); | ||||
} | } | ||||
static void _set_midi_program(PluginHandle handle, uint8_t channel, uint32_t bank, uint32_t program) | |||||
static void _set_midi_program(NativePluginHandle handle, uint8_t channel, uint32_t bank, uint32_t program) | |||||
{ | { | ||||
handlePtr->setMidiProgram(channel, bank, program); | handlePtr->setMidiProgram(channel, bank, program); | ||||
} | } | ||||
static void _set_custom_data(PluginHandle handle, const char* key, const char* value) | |||||
static void _set_custom_data(NativePluginHandle handle, const char* key, const char* value) | |||||
{ | { | ||||
handlePtr->setCustomData(key, value); | handlePtr->setCustomData(key, value); | ||||
} | } | ||||
static void _ui_show(PluginHandle handle, bool show) | |||||
static void _ui_show(NativePluginHandle handle, bool show) | |||||
{ | { | ||||
handlePtr->uiShow(show); | handlePtr->uiShow(show); | ||||
} | } | ||||
static void _ui_idle(PluginHandle handle) | |||||
static void _ui_idle(NativePluginHandle handle) | |||||
{ | { | ||||
handlePtr->uiIdle(); | handlePtr->uiIdle(); | ||||
} | } | ||||
static void _ui_set_parameter_value(PluginHandle handle, uint32_t index, float value) | |||||
static void _ui_set_parameter_value(NativePluginHandle handle, uint32_t index, float value) | |||||
{ | { | ||||
handlePtr->uiSetParameterValue(index, value); | handlePtr->uiSetParameterValue(index, value); | ||||
} | } | ||||
static void _ui_set_midi_program(PluginHandle handle, uint8_t channel, uint32_t bank, uint32_t program) | |||||
static void _ui_set_midi_program(NativePluginHandle handle, uint8_t channel, uint32_t bank, uint32_t program) | |||||
{ | { | ||||
handlePtr->uiSetMidiProgram(channel, bank, program); | handlePtr->uiSetMidiProgram(channel, bank, program); | ||||
} | } | ||||
static void _ui_set_custom_data(PluginHandle handle, const char* key, const char* value) | |||||
static void _ui_set_custom_data(NativePluginHandle handle, const char* key, const char* value) | |||||
{ | { | ||||
handlePtr->uiSetCustomData(key, value); | handlePtr->uiSetCustomData(key, value); | ||||
} | } | ||||
static void _activate(PluginHandle handle) | |||||
static void _activate(NativePluginHandle handle) | |||||
{ | { | ||||
handlePtr->activate(); | handlePtr->activate(); | ||||
} | } | ||||
static void _deactivate(PluginHandle handle) | |||||
static void _deactivate(NativePluginHandle handle) | |||||
{ | { | ||||
handlePtr->deactivate(); | handlePtr->deactivate(); | ||||
} | } | ||||
static void _process(PluginHandle handle, float** inBuffer, float** outBuffer, const uint32_t frames, const MidiEvent* midiEvents, uint32_t midiEventCount) | |||||
static void _process(NativePluginHandle handle, float** inBuffer, float** outBuffer, const uint32_t frames, const NativeMidiEvent* midiEvents, uint32_t midiEventCount) | |||||
{ | { | ||||
handlePtr->process(inBuffer, outBuffer, frames, midiEvents, midiEventCount); | handlePtr->process(inBuffer, outBuffer, frames, midiEvents, midiEventCount); | ||||
} | } | ||||
static char* _get_state(PluginHandle handle) | |||||
static char* _get_state(NativePluginHandle handle) | |||||
{ | { | ||||
return handlePtr->getState(); | return handlePtr->getState(); | ||||
} | } | ||||
static void _set_state(PluginHandle handle, const char* data) | |||||
static void _set_state(NativePluginHandle handle, const char* data) | |||||
{ | { | ||||
handlePtr->setState(data); | handlePtr->setState(data); | ||||
} | } | ||||
static intptr_t _dispatcher(PluginHandle handle, PluginDispatcherOpcode opcode, int32_t index, intptr_t value, void* ptr, float opt) | |||||
static intptr_t _dispatcher(NativePluginHandle handle, NativePluginDispatcherOpcode opcode, int32_t index, intptr_t value, void* ptr, float opt) | |||||
{ | { | ||||
switch(opcode) | switch(opcode) | ||||
{ | { | ||||
@@ -559,7 +559,7 @@ public: | |||||
#undef handlePtr | #undef handlePtr | ||||
CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PluginClass) | |||||
CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(NativePluginClass) | |||||
#endif | #endif | ||||
}; | }; | ||||
@@ -567,15 +567,15 @@ public: | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
#define PluginClassEND(ClassName) \ | |||||
public: \ | |||||
static PluginHandle _instantiate(const HostDescriptor* host) \ | |||||
{ \ | |||||
return new ClassName(host); \ | |||||
} \ | |||||
static void _cleanup(PluginHandle handle) \ | |||||
{ \ | |||||
delete (ClassName*)handle; \ | |||||
#define PluginClassEND(ClassName) \ | |||||
public: \ | |||||
static NativePluginHandle _instantiate(const NativeHostDescriptor* host) \ | |||||
{ \ | |||||
return new ClassName(host); \ | |||||
} \ | |||||
static void _cleanup(NativePluginHandle handle) \ | |||||
{ \ | |||||
delete (ClassName*)handle; \ | |||||
} | } | ||||
#define PluginDescriptorFILL(ClassName) \ | #define PluginDescriptorFILL(ClassName) \ | ||||
@@ -22,12 +22,12 @@ | |||||
#define PROGRAM_COUNT 16 | #define PROGRAM_COUNT 16 | ||||
class AudioFilePlugin : public PluginClass, | |||||
class AudioFilePlugin : public NativePluginClass, | |||||
public AbstractAudioPlayer | public AbstractAudioPlayer | ||||
{ | { | ||||
public: | public: | ||||
AudioFilePlugin(const HostDescriptor* const host) | |||||
: PluginClass(host), | |||||
AudioFilePlugin(const NativeHostDescriptor* const host) | |||||
: NativePluginClass(host), | |||||
AbstractAudioPlayer(), | AbstractAudioPlayer(), | ||||
fLoopMode(false), | fLoopMode(false), | ||||
fDoProcess(false), | fDoProcess(false), | ||||
@@ -58,16 +58,16 @@ protected: | |||||
return 0; // TODO - loopMode | return 0; // TODO - loopMode | ||||
} | } | ||||
const Parameter* getParameterInfo(const uint32_t index) const override | |||||
const NativeParameter* getParameterInfo(const uint32_t index) const override | |||||
{ | { | ||||
if (index != 0) | if (index != 0) | ||||
return nullptr; | return nullptr; | ||||
static Parameter param; | |||||
static NativeParameter param; | |||||
param.name = "Loop Mode"; | param.name = "Loop Mode"; | ||||
param.unit = nullptr; | param.unit = nullptr; | ||||
param.hints = static_cast<ParameterHints>(PARAMETER_IS_ENABLED|PARAMETER_IS_BOOLEAN); | |||||
param.hints = static_cast<NativeParameterHints>(PARAMETER_IS_ENABLED|PARAMETER_IS_BOOLEAN); | |||||
param.ranges.def = 1.0f; | param.ranges.def = 1.0f; | ||||
param.ranges.min = 0.0f; | param.ranges.min = 0.0f; | ||||
param.ranges.max = 1.0f; | param.ranges.max = 1.0f; | ||||
@@ -116,9 +116,9 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Plugin process calls | // Plugin process calls | ||||
void process(float**, float** const outBuffer, const uint32_t frames, const MidiEvent* const, const uint32_t) override | |||||
void process(float**, float** const outBuffer, const uint32_t frames, const NativeMidiEvent* const, const uint32_t) override | |||||
{ | { | ||||
const TimeInfo* const timePos(getTimeInfo()); | |||||
const NativeTimeInfo* const timePos(getTimeInfo()); | |||||
float* out1 = outBuffer[0]; | float* out1 = outBuffer[0]; | ||||
float* out2 = outBuffer[1]; | float* out2 = outBuffer[1]; | ||||
@@ -259,10 +259,10 @@ private: | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static const PluginDescriptor audiofileDesc = { | |||||
static const NativePluginDescriptor audiofileDesc = { | |||||
/* category */ PLUGIN_CATEGORY_UTILITY, | /* category */ PLUGIN_CATEGORY_UTILITY, | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_GUI|PLUGIN_NEEDS_UI_OPEN_SAVE), | |||||
/* supports */ static_cast<PluginSupports>(0x0), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI|PLUGIN_NEEDS_UI_OPEN_SAVE), | |||||
/* supports */ static_cast<NativePluginSupports>(0x0), | |||||
/* audioIns */ 0, | /* audioIns */ 0, | ||||
/* audioOuts */ 2, | /* audioOuts */ 2, | ||||
/* midiIns */ 0, | /* midiIns */ 0, | ||||
@@ -21,13 +21,13 @@ | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static PluginHandle bypass_instantiate(const HostDescriptor* host) | |||||
static NativePluginHandle bypass_instantiate(const NativeHostDescriptor* host) | |||||
{ | { | ||||
// dummy, return non-NULL | // dummy, return non-NULL | ||||
return (PluginHandle)host; | |||||
return (NativePluginHandle)host; | |||||
} | } | ||||
static void bypass_process(PluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const MidiEvent* midiEvents, uint32_t midiEventCount) | |||||
static void bypass_process(NativePluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const NativeMidiEvent* midiEvents, uint32_t midiEventCount) | |||||
{ | { | ||||
memcpy(outBuffer[0], inBuffer[0], sizeof(float)*frames); | memcpy(outBuffer[0], inBuffer[0], sizeof(float)*frames); | ||||
return; | return; | ||||
@@ -40,7 +40,7 @@ static void bypass_process(PluginHandle handle, float** inBuffer, float** outBuf | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static const PluginDescriptor bypassDesc = { | |||||
static const NativePluginDescriptor bypassDesc = { | |||||
.category = PLUGIN_CATEGORY_NONE, | .category = PLUGIN_CATEGORY_NONE, | ||||
.hints = PLUGIN_IS_RTSAFE, | .hints = PLUGIN_IS_RTSAFE, | ||||
.supports = 0x0, | .supports = 0x0, | ||||
@@ -29,10 +29,10 @@ START_NAMESPACE_DISTRHO | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static const PluginDescriptor tBandEqDesc = { | |||||
static const NativePluginDescriptor tBandEqDesc = { | |||||
/* category */ PLUGIN_CATEGORY_EQ, | /* category */ PLUGIN_CATEGORY_EQ, | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_GUI), | |||||
/* supports */ static_cast<PluginSupports>(0x0), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI), | |||||
/* supports */ static_cast<NativePluginSupports>(0x0), | |||||
/* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | /* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | ||||
/* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | /* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | ||||
/* midiIns */ 0, | /* midiIns */ 0, | ||||
@@ -29,10 +29,10 @@ START_NAMESPACE_DISTRHO | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static const PluginDescriptor tBandSplitterDesc = { | |||||
static const NativePluginDescriptor tBandSplitterDesc = { | |||||
/* category */ PLUGIN_CATEGORY_EQ, | /* category */ PLUGIN_CATEGORY_EQ, | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_GUI), | |||||
/* supports */ static_cast<PluginSupports>(0x0), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI), | |||||
/* supports */ static_cast<NativePluginSupports>(0x0), | |||||
/* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | /* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | ||||
/* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | /* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | ||||
/* midiIns */ 0, | /* midiIns */ 0, | ||||
@@ -28,10 +28,10 @@ START_NAMESPACE_DISTRHO | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static const PluginDescriptor bigMeterDesc = { | |||||
static const NativePluginDescriptor bigMeterDesc = { | |||||
/* category */ PLUGIN_CATEGORY_UTILITY, | /* category */ PLUGIN_CATEGORY_UTILITY, | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_GUI), | |||||
/* supports */ static_cast<PluginSupports>(0x0), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI), | |||||
/* supports */ static_cast<NativePluginSupports>(0x0), | |||||
/* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | /* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | ||||
/* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | /* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | ||||
/* midiIns */ 0, | /* midiIns */ 0, | ||||
@@ -28,10 +28,10 @@ START_NAMESPACE_DISTRHO | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static const PluginDescriptor bigMeterMDesc = { | |||||
static const NativePluginDescriptor bigMeterMDesc = { | |||||
/* category */ PLUGIN_CATEGORY_UTILITY, | /* category */ PLUGIN_CATEGORY_UTILITY, | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_GUI), | |||||
/* supports */ static_cast<PluginSupports>(0x0), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI), | |||||
/* supports */ static_cast<NativePluginSupports>(0x0), | |||||
/* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | /* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | ||||
/* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | /* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | ||||
/* midiIns */ 0, | /* midiIns */ 0, | ||||
@@ -29,10 +29,10 @@ START_NAMESPACE_DISTRHO | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static const PluginDescriptor nekobiDesc = { | |||||
static const NativePluginDescriptor nekobiDesc = { | |||||
/* category */ PLUGIN_CATEGORY_SYNTH, | /* category */ PLUGIN_CATEGORY_SYNTH, | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_GUI), | |||||
/* supports */ static_cast<PluginSupports>(PLUGIN_SUPPORTS_CONTROL_CHANGES|PLUGIN_SUPPORTS_ALL_SOUND_OFF), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI), | |||||
/* supports */ static_cast<NativePluginSupports>(PLUGIN_SUPPORTS_CONTROL_CHANGES|PLUGIN_SUPPORTS_ALL_SOUND_OFF), | |||||
/* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | /* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | ||||
/* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | /* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | ||||
/* midiIns */ 1, | /* midiIns */ 1, | ||||
@@ -28,10 +28,10 @@ START_NAMESPACE_DISTRHO | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static const PluginDescriptor notesDesc = { | |||||
static const NativePluginDescriptor notesDesc = { | |||||
/* category */ PLUGIN_CATEGORY_UTILITY, | /* category */ PLUGIN_CATEGORY_UTILITY, | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_GUI), | |||||
/* supports */ static_cast<PluginSupports>(0x0), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI), | |||||
/* supports */ static_cast<NativePluginSupports>(0x0), | |||||
/* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | /* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | ||||
/* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | /* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | ||||
/* midiIns */ 0, | /* midiIns */ 0, | ||||
@@ -29,10 +29,10 @@ START_NAMESPACE_DISTRHO | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static PluginDescriptor pppDesc = { | |||||
static const NativePluginDescriptor pppDesc = { | |||||
/* category */ PLUGIN_CATEGORY_UTILITY, | /* category */ PLUGIN_CATEGORY_UTILITY, | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_GUI), | |||||
/* supports */ static_cast<PluginSupports>(0x0), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI), | |||||
/* supports */ static_cast<NativePluginSupports>(0x0), | |||||
/* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | /* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | ||||
/* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | /* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | ||||
/* midiIns */ 0, | /* midiIns */ 0, | ||||
@@ -29,10 +29,10 @@ START_NAMESPACE_DISTRHO | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static const PluginDescriptor stereoenhancerDesc = { | |||||
static const NativePluginDescriptor stereoenhancerDesc = { | |||||
/* category */ PLUGIN_CATEGORY_EQ, | /* category */ PLUGIN_CATEGORY_EQ, | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_GUI), | |||||
/* supports */ static_cast<PluginSupports>(0x0), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI), | |||||
/* supports */ static_cast<NativePluginSupports>(0x0), | |||||
/* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | /* audioIns */ DISTRHO_PLUGIN_NUM_INPUTS, | ||||
/* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | /* audioOuts */ DISTRHO_PLUGIN_NUM_OUTPUTS, | ||||
/* midiIns */ 0, | /* midiIns */ 0, | ||||
@@ -63,7 +63,7 @@ class UICarla | |||||
#endif | #endif | ||||
{ | { | ||||
public: | public: | ||||
UICarla(const HostDescriptor* const host, PluginInternal* const plugin) | |||||
UICarla(const NativeHostDescriptor* const host, PluginInternal* const plugin) | |||||
: fHost(host), | : fHost(host), | ||||
fPlugin(plugin), | fPlugin(plugin), | ||||
fUi(this, 0, editParameterCallback, setParameterCallback, setStateCallback, sendNoteCallback, uiResizeCallback) | fUi(this, 0, editParameterCallback, setParameterCallback, setStateCallback, sendNoteCallback, uiResizeCallback) | ||||
@@ -254,7 +254,7 @@ protected: | |||||
private: | private: | ||||
// Plugin stuff | // Plugin stuff | ||||
const HostDescriptor* const fHost; | |||||
const NativeHostDescriptor* const fHost; | |||||
PluginInternal* const fPlugin; | PluginInternal* const fPlugin; | ||||
// UI | // UI | ||||
@@ -310,11 +310,11 @@ private: | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
// Carla Plugin | // Carla Plugin | ||||
class PluginCarla : public PluginClass | |||||
class PluginCarla : public NativePluginClass | |||||
{ | { | ||||
public: | public: | ||||
PluginCarla(const HostDescriptor* const host) | |||||
: PluginClass(host) | |||||
PluginCarla(const NativeHostDescriptor* const host) | |||||
: NativePluginClass(host) | |||||
{ | { | ||||
#if DISTRHO_PLUGIN_HAS_UI | #if DISTRHO_PLUGIN_HAS_UI | ||||
fUiPtr = nullptr; | fUiPtr = nullptr; | ||||
@@ -341,11 +341,11 @@ protected: | |||||
return fPlugin.getParameterCount(); | return fPlugin.getParameterCount(); | ||||
} | } | ||||
const ::Parameter* getParameterInfo(const uint32_t index) const override | |||||
const NativeParameter* getParameterInfo(const uint32_t index) const override | |||||
{ | { | ||||
CARLA_ASSERT(index < getParameterCount()); | CARLA_ASSERT(index < getParameterCount()); | ||||
static ::Parameter param; | |||||
static NativeParameter param; | |||||
// reset | // reset | ||||
param.hints = ::PARAMETER_IS_ENABLED; | param.hints = ::PARAMETER_IS_ENABLED; | ||||
@@ -367,7 +367,7 @@ protected: | |||||
if (paramHints & PARAMETER_IS_OUTPUT) | if (paramHints & PARAMETER_IS_OUTPUT) | ||||
nativeParamHints |= ::PARAMETER_IS_OUTPUT; | nativeParamHints |= ::PARAMETER_IS_OUTPUT; | ||||
param.hints = static_cast<ParameterHints>(nativeParamHints); | |||||
param.hints = static_cast<NativeParameterHints>(nativeParamHints); | |||||
} | } | ||||
param.name = fPlugin.getParameterName(index); | param.name = fPlugin.getParameterName(index); | ||||
@@ -403,14 +403,14 @@ protected: | |||||
return fPlugin.getProgramCount(); | return fPlugin.getProgramCount(); | ||||
} | } | ||||
const ::MidiProgram* getMidiProgramInfo(const uint32_t index) const override | |||||
const NativeMidiProgram* getMidiProgramInfo(const uint32_t index) const override | |||||
{ | { | ||||
CARLA_ASSERT(index < getMidiProgramCount()); | CARLA_ASSERT(index < getMidiProgramCount()); | ||||
if (index >= fPlugin.getProgramCount()) | if (index >= fPlugin.getProgramCount()) | ||||
return nullptr; | return nullptr; | ||||
static ::MidiProgram midiProgram; | |||||
static NativeMidiProgram midiProgram; | |||||
midiProgram.bank = index / 128; | midiProgram.bank = index / 128; | ||||
midiProgram.program = index % 128; | midiProgram.program = index % 128; | ||||
@@ -466,14 +466,14 @@ protected: | |||||
} | } | ||||
#if DISTRHO_PLUGIN_IS_SYNTH | #if DISTRHO_PLUGIN_IS_SYNTH | ||||
void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, const ::MidiEvent* const midiEvents, const uint32_t midiEventCount) override | |||||
void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, const NativeMidiEvent* const midiEvents, const uint32_t midiEventCount) override | |||||
{ | { | ||||
uint32_t i; | uint32_t i; | ||||
for (i=0; i < midiEventCount && i < MAX_MIDI_EVENTS; ++i) | for (i=0; i < midiEventCount && i < MAX_MIDI_EVENTS; ++i) | ||||
{ | { | ||||
const ::MidiEvent* const midiEvent = &midiEvents[i]; | |||||
MidiEvent* const realMidiEvent = &fRealMidiEvents[i]; | |||||
const NativeMidiEvent* const midiEvent(&midiEvents[i]); | |||||
MidiEvent* const realMidiEvent(&fRealMidiEvents[i]); | |||||
realMidiEvent->frame = midiEvent->time; | realMidiEvent->frame = midiEvent->time; | ||||
realMidiEvent->size = midiEvent->size; | realMidiEvent->size = midiEvent->size; | ||||
@@ -485,7 +485,7 @@ protected: | |||||
fPlugin.run(inBuffer, outBuffer, frames, fRealMidiEvents, i); | fPlugin.run(inBuffer, outBuffer, frames, fRealMidiEvents, i); | ||||
} | } | ||||
#else | #else | ||||
void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, const ::MidiEvent* const, const uint32_t) override | |||||
void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, const NativeMidiEvent* const, const uint32_t) override | |||||
{ | { | ||||
fPlugin.run(inBuffer, outBuffer, frames, nullptr, 0); | fPlugin.run(inBuffer, outBuffer, frames, nullptr, 0); | ||||
} | } | ||||
@@ -598,14 +598,14 @@ private: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
public: | public: | ||||
static PluginHandle _instantiate(const HostDescriptor* host) | |||||
static NativePluginHandle _instantiate(const NativeHostDescriptor* host) | |||||
{ | { | ||||
d_lastBufferSize = host->get_buffer_size(host->handle); | d_lastBufferSize = host->get_buffer_size(host->handle); | ||||
d_lastSampleRate = host->get_sample_rate(host->handle); | d_lastSampleRate = host->get_sample_rate(host->handle); | ||||
return new PluginCarla(host); | return new PluginCarla(host); | ||||
} | } | ||||
static void _cleanup(PluginHandle handle) | |||||
static void _cleanup(NativePluginHandle handle) | |||||
{ | { | ||||
delete (PluginCarla*)handle; | delete (PluginCarla*)handle; | ||||
} | } | ||||
@@ -35,7 +35,7 @@ typedef enum { | |||||
} LfoParams; | } LfoParams; | ||||
typedef struct { | typedef struct { | ||||
const HostDescriptor* host; | |||||
const NativeHostDescriptor* host; | |||||
int mode; | int mode; | ||||
float speed; | float speed; | ||||
float multiplier; | float multiplier; | ||||
@@ -45,7 +45,7 @@ typedef struct { | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static PluginHandle lfo_instantiate(const HostDescriptor* host) | |||||
static NativePluginHandle lfo_instantiate(const NativeHostDescriptor* host) | |||||
{ | { | ||||
LfoHandle* const handle = (LfoHandle*)malloc(sizeof(LfoHandle)); | LfoHandle* const handle = (LfoHandle*)malloc(sizeof(LfoHandle)); | ||||
@@ -65,12 +65,12 @@ static PluginHandle lfo_instantiate(const HostDescriptor* host) | |||||
#define handlePtr ((LfoHandle*)handle) | #define handlePtr ((LfoHandle*)handle) | ||||
static void lfo_cleanup(PluginHandle handle) | |||||
static void lfo_cleanup(NativePluginHandle handle) | |||||
{ | { | ||||
free(handlePtr); | free(handlePtr); | ||||
} | } | ||||
static uint32_t lfo_get_parameter_count(PluginHandle handle) | |||||
static uint32_t lfo_get_parameter_count(NativePluginHandle handle) | |||||
{ | { | ||||
return PARAM_COUNT; | return PARAM_COUNT; | ||||
@@ -78,13 +78,13 @@ static uint32_t lfo_get_parameter_count(PluginHandle handle) | |||||
(void)handle; | (void)handle; | ||||
} | } | ||||
const Parameter* lfo_get_parameter_info(PluginHandle handle, uint32_t index) | |||||
const NativeParameter* lfo_get_parameter_info(NativePluginHandle handle, uint32_t index) | |||||
{ | { | ||||
if (index > PARAM_COUNT) | if (index > PARAM_COUNT) | ||||
return NULL; | return NULL; | ||||
static Parameter param; | |||||
static ParameterScalePoint paramModes[5]; | |||||
static NativeParameter param; | |||||
static NativeParameterScalePoint paramModes[5]; | |||||
param.hints = PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE; | param.hints = PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE; | ||||
param.scalePointCount = 0; | param.scalePointCount = 0; | ||||
@@ -166,7 +166,7 @@ const Parameter* lfo_get_parameter_info(PluginHandle handle, uint32_t index) | |||||
(void)handle; | (void)handle; | ||||
} | } | ||||
static float lfo_get_parameter_value(PluginHandle handle, uint32_t index) | |||||
static float lfo_get_parameter_value(NativePluginHandle handle, uint32_t index) | |||||
{ | { | ||||
switch (index) | switch (index) | ||||
{ | { | ||||
@@ -185,7 +185,7 @@ static float lfo_get_parameter_value(PluginHandle handle, uint32_t index) | |||||
} | } | ||||
} | } | ||||
static void lfo_set_parameter_value(PluginHandle handle, uint32_t index, float value) | |||||
static void lfo_set_parameter_value(NativePluginHandle handle, uint32_t index, float value) | |||||
{ | { | ||||
switch (index) | switch (index) | ||||
{ | { | ||||
@@ -207,10 +207,10 @@ static void lfo_set_parameter_value(PluginHandle handle, uint32_t index, float v | |||||
} | } | ||||
} | } | ||||
static void lfo_process(PluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const MidiEvent* midiEvents, uint32_t midiEventCount) | |||||
static void lfo_process(NativePluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const NativeMidiEvent* midiEvents, uint32_t midiEventCount) | |||||
{ | { | ||||
const HostDescriptor* const host = handlePtr->host; | |||||
const TimeInfo* const timeInfo = host->get_time_info(host->handle); | |||||
const NativeHostDescriptor* const host = handlePtr->host; | |||||
const NativeTimeInfo* const timeInfo = host->get_time_info(host->handle); | |||||
if (! timeInfo->playing) | if (! timeInfo->playing) | ||||
return; | return; | ||||
@@ -266,7 +266,7 @@ static void lfo_process(PluginHandle handle, float** inBuffer, float** outBuffer | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static const PluginDescriptor lfoDesc = { | |||||
static const NativePluginDescriptor lfoDesc = { | |||||
.category = PLUGIN_CATEGORY_UTILITY, | .category = PLUGIN_CATEGORY_UTILITY, | ||||
.hints = PLUGIN_IS_RTSAFE, | .hints = PLUGIN_IS_RTSAFE, | ||||
.supports = 0x0, | .supports = 0x0, | ||||
@@ -20,12 +20,12 @@ | |||||
#include <smf.h> | #include <smf.h> | ||||
class MidiFilePlugin : public PluginClass, | |||||
class MidiFilePlugin : public NativePluginClass, | |||||
public AbstractMidiPlayer | public AbstractMidiPlayer | ||||
{ | { | ||||
public: | public: | ||||
MidiFilePlugin(const HostDescriptor* const host) | |||||
: PluginClass(host), | |||||
MidiFilePlugin(const NativeHostDescriptor* const host) | |||||
: NativePluginClass(host), | |||||
fMidiOut(this), | fMidiOut(this), | ||||
fWasPlayingBefore(false) | fWasPlayingBefore(false) | ||||
{ | { | ||||
@@ -53,9 +53,9 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Plugin process calls | // Plugin process calls | ||||
void process(float**, float**, const uint32_t frames, const MidiEvent* const, const uint32_t) override | |||||
void process(float**, float**, const uint32_t frames, const NativeMidiEvent* const, const uint32_t) override | |||||
{ | { | ||||
const TimeInfo* const timePos(getTimeInfo()); | |||||
const NativeTimeInfo* const timePos(getTimeInfo()); | |||||
if (timePos->playing) | if (timePos->playing) | ||||
{ | { | ||||
@@ -63,7 +63,7 @@ protected: | |||||
} | } | ||||
else if (fWasPlayingBefore) | else if (fWasPlayingBefore) | ||||
{ | { | ||||
MidiEvent midiEvent; | |||||
NativeMidiEvent midiEvent; | |||||
midiEvent.port = 0; | midiEvent.port = 0; | ||||
midiEvent.time = 0; | midiEvent.time = 0; | ||||
@@ -76,7 +76,7 @@ protected: | |||||
for (int i=0; i < MAX_MIDI_CHANNELS; ++i) | for (int i=0; i < MAX_MIDI_CHANNELS; ++i) | ||||
{ | { | ||||
midiEvent.data[0] = MIDI_STATUS_CONTROL_CHANGE+i; | midiEvent.data[0] = MIDI_STATUS_CONTROL_CHANGE+i; | ||||
PluginClass::writeMidiEvent(&midiEvent); | |||||
NativePluginClass::writeMidiEvent(&midiEvent); | |||||
} | } | ||||
carla_stdout("WAS PLAYING BEFORE, NOW STOPPED"); | carla_stdout("WAS PLAYING BEFORE, NOW STOPPED"); | ||||
@@ -106,7 +106,7 @@ protected: | |||||
void writeMidiEvent(const uint32_t timePosFrame, const RawMidiEvent* const event) override | void writeMidiEvent(const uint32_t timePosFrame, const RawMidiEvent* const event) override | ||||
{ | { | ||||
MidiEvent midiEvent; | |||||
NativeMidiEvent midiEvent; | |||||
midiEvent.port = 0; | midiEvent.port = 0; | ||||
midiEvent.time = event->time-timePosFrame; | midiEvent.time = event->time-timePosFrame; | ||||
@@ -116,7 +116,7 @@ protected: | |||||
midiEvent.data[3] = event->data[3]; | midiEvent.data[3] = event->data[3]; | ||||
midiEvent.size = event->size; | midiEvent.size = event->size; | ||||
PluginClass::writeMidiEvent(&midiEvent); | |||||
NativePluginClass::writeMidiEvent(&midiEvent); | |||||
} | } | ||||
private: | private: | ||||
@@ -218,10 +218,10 @@ private: | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static const PluginDescriptor midifileDesc = { | |||||
static const NativePluginDescriptor midifileDesc = { | |||||
/* category */ PLUGIN_CATEGORY_UTILITY, | /* category */ PLUGIN_CATEGORY_UTILITY, | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_GUI|PLUGIN_NEEDS_UI_OPEN_SAVE), | |||||
/* supports */ static_cast<PluginSupports>(0x0), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI|PLUGIN_NEEDS_UI_OPEN_SAVE), | |||||
/* supports */ static_cast<NativePluginSupports>(0x0), | |||||
/* audioIns */ 0, | /* audioIns */ 0, | ||||
/* audioOuts */ 0, | /* audioOuts */ 0, | ||||
/* midiIns */ 0, | /* midiIns */ 0, | ||||
@@ -32,7 +32,7 @@ typedef enum { | |||||
} MidiGainParams; | } MidiGainParams; | ||||
typedef struct { | typedef struct { | ||||
const HostDescriptor* host; | |||||
const NativeHostDescriptor* host; | |||||
float gain; | float gain; | ||||
bool applyNotes; | bool applyNotes; | ||||
bool applyAftertouch; | bool applyAftertouch; | ||||
@@ -41,7 +41,7 @@ typedef struct { | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static PluginHandle midiGain_instantiate(const HostDescriptor* host) | |||||
static NativePluginHandle midiGain_instantiate(const NativeHostDescriptor* host) | |||||
{ | { | ||||
MidiGainHandle* const handle = (MidiGainHandle*)malloc(sizeof(MidiGainHandle)); | MidiGainHandle* const handle = (MidiGainHandle*)malloc(sizeof(MidiGainHandle)); | ||||
@@ -58,12 +58,12 @@ static PluginHandle midiGain_instantiate(const HostDescriptor* host) | |||||
#define handlePtr ((MidiGainHandle*)handle) | #define handlePtr ((MidiGainHandle*)handle) | ||||
static void midiGain_cleanup(PluginHandle handle) | |||||
static void midiGain_cleanup(NativePluginHandle handle) | |||||
{ | { | ||||
free(handlePtr); | free(handlePtr); | ||||
} | } | ||||
static uint32_t midiGain_get_parameter_count(PluginHandle handle) | |||||
static uint32_t midiGain_get_parameter_count(NativePluginHandle handle) | |||||
{ | { | ||||
return PARAM_COUNT; | return PARAM_COUNT; | ||||
@@ -71,12 +71,12 @@ static uint32_t midiGain_get_parameter_count(PluginHandle handle) | |||||
(void)handle; | (void)handle; | ||||
} | } | ||||
const Parameter* midiGain_get_parameter_info(PluginHandle handle, uint32_t index) | |||||
const NativeParameter* midiGain_get_parameter_info(NativePluginHandle handle, uint32_t index) | |||||
{ | { | ||||
if (index > PARAM_COUNT) | if (index > PARAM_COUNT) | ||||
return NULL; | return NULL; | ||||
static Parameter param; | |||||
static NativeParameter param; | |||||
param.hints = PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE; | param.hints = PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE; | ||||
param.unit = NULL; | param.unit = NULL; | ||||
@@ -132,7 +132,7 @@ const Parameter* midiGain_get_parameter_info(PluginHandle handle, uint32_t index | |||||
(void)handle; | (void)handle; | ||||
} | } | ||||
static float midiGain_get_parameter_value(PluginHandle handle, uint32_t index) | |||||
static float midiGain_get_parameter_value(NativePluginHandle handle, uint32_t index) | |||||
{ | { | ||||
switch (index) | switch (index) | ||||
{ | { | ||||
@@ -149,7 +149,7 @@ static float midiGain_get_parameter_value(PluginHandle handle, uint32_t index) | |||||
} | } | ||||
} | } | ||||
static void midiGain_set_parameter_value(PluginHandle handle, uint32_t index, float value) | |||||
static void midiGain_set_parameter_value(NativePluginHandle handle, uint32_t index, float value) | |||||
{ | { | ||||
switch (index) | switch (index) | ||||
{ | { | ||||
@@ -168,18 +168,18 @@ static void midiGain_set_parameter_value(PluginHandle handle, uint32_t index, fl | |||||
} | } | ||||
} | } | ||||
static void midiGain_process(PluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const MidiEvent* midiEvents, uint32_t midiEventCount) | |||||
static void midiGain_process(NativePluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const NativeMidiEvent* midiEvents, uint32_t midiEventCount) | |||||
{ | { | ||||
const HostDescriptor* const host = handlePtr->host; | |||||
const NativeHostDescriptor* const host = handlePtr->host; | |||||
const float gain = handlePtr->gain; | const float gain = handlePtr->gain; | ||||
const bool applyNotes = handlePtr->applyNotes; | const bool applyNotes = handlePtr->applyNotes; | ||||
const bool applyAftertouch = handlePtr->applyAftertouch; | const bool applyAftertouch = handlePtr->applyAftertouch; | ||||
const bool applyCC = handlePtr->applyCC; | const bool applyCC = handlePtr->applyCC; | ||||
MidiEvent tmpEvent; | |||||
NativeMidiEvent tmpEvent; | |||||
for (uint32_t i=0; i < midiEventCount; ++i) | for (uint32_t i=0; i < midiEventCount; ++i) | ||||
{ | { | ||||
const MidiEvent* const midiEvent = &midiEvents[i]; | |||||
const NativeMidiEvent* const midiEvent = &midiEvents[i]; | |||||
const uint8_t status = MIDI_GET_STATUS_FROM_DATA(midiEvent->data); | const uint8_t status = MIDI_GET_STATUS_FROM_DATA(midiEvent->data); | ||||
@@ -187,7 +187,7 @@ static void midiGain_process(PluginHandle handle, float** inBuffer, float** outB | |||||
(applyAftertouch && status == MIDI_STATUS_POLYPHONIC_AFTERTOUCH) || | (applyAftertouch && status == MIDI_STATUS_POLYPHONIC_AFTERTOUCH) || | ||||
(applyCC && status == MIDI_STATUS_CONTROL_CHANGE))) | (applyCC && status == MIDI_STATUS_CONTROL_CHANGE))) | ||||
{ | { | ||||
memcpy(&tmpEvent, midiEvent, sizeof(MidiEvent)); | |||||
memcpy(&tmpEvent, midiEvent, sizeof(NativeMidiEvent)); | |||||
float value = (float)midiEvent->data[2] * gain; | float value = (float)midiEvent->data[2] * gain; | ||||
@@ -214,7 +214,7 @@ static void midiGain_process(PluginHandle handle, float** inBuffer, float** outB | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static const PluginDescriptor midiGainDesc = { | |||||
static const NativePluginDescriptor midiGainDesc = { | |||||
.category = PLUGIN_CATEGORY_UTILITY, | .category = PLUGIN_CATEGORY_UTILITY, | ||||
.hints = PLUGIN_IS_RTSAFE, | .hints = PLUGIN_IS_RTSAFE, | ||||
.supports = PLUGIN_SUPPORTS_EVERYTHING, | .supports = PLUGIN_SUPPORTS_EVERYTHING, | ||||
@@ -18,12 +18,12 @@ | |||||
#include "CarlaNative.hpp" | #include "CarlaNative.hpp" | ||||
#include "midi-base.hpp" | #include "midi-base.hpp" | ||||
class MidiSequencerPlugin : public PluginClass, | |||||
class MidiSequencerPlugin : public NativePluginClass, | |||||
public AbstractMidiPlayer | public AbstractMidiPlayer | ||||
{ | { | ||||
public: | public: | ||||
MidiSequencerPlugin(const HostDescriptor* const host) | |||||
: PluginClass(host), | |||||
MidiSequencerPlugin(const NativeHostDescriptor* const host) | |||||
: NativePluginClass(host), | |||||
fWantInEvents(false), | fWantInEvents(false), | ||||
fMidiOut(this) | fMidiOut(this) | ||||
{ | { | ||||
@@ -136,9 +136,9 @@ protected: | |||||
{ | { | ||||
} | } | ||||
void process(float**, float**, const uint32_t frames, const MidiEvent* const midiEvents, const uint32_t midiEventCount) override | |||||
void process(float**, float**, const uint32_t frames, const NativeMidiEvent* const midiEvents, const uint32_t midiEventCount) override | |||||
{ | { | ||||
const TimeInfo* const timePos = getTimeInfo(); | |||||
const NativeTimeInfo* const timePos = getTimeInfo(); | |||||
if (fWantInEvents) | if (fWantInEvents) | ||||
{ | { | ||||
@@ -146,7 +146,7 @@ protected: | |||||
for (uint32_t i=0; i < midiEventCount; ++i) | for (uint32_t i=0; i < midiEventCount; ++i) | ||||
{ | { | ||||
const MidiEvent* const midiEvent = &midiEvents[i]; | |||||
const NativeMidiEvent* const midiEvent = &midiEvents[i]; | |||||
rawMidiEvent.data[0] = midiEvent->data[0]; | rawMidiEvent.data[0] = midiEvent->data[0]; | ||||
rawMidiEvent.data[1] = midiEvent->data[1]; | rawMidiEvent.data[1] = midiEvent->data[1]; | ||||
@@ -174,7 +174,7 @@ protected: | |||||
void writeMidiEvent(const uint32_t timePosFrame, const RawMidiEvent* const event) override | void writeMidiEvent(const uint32_t timePosFrame, const RawMidiEvent* const event) override | ||||
{ | { | ||||
MidiEvent midiEvent; | |||||
NativeMidiEvent midiEvent; | |||||
midiEvent.port = 0; | midiEvent.port = 0; | ||||
midiEvent.time = event->time-timePosFrame; | midiEvent.time = event->time-timePosFrame; | ||||
@@ -184,7 +184,7 @@ protected: | |||||
midiEvent.data[3] = event->data[3]; | midiEvent.data[3] = event->data[3]; | ||||
midiEvent.size = event->size; | midiEvent.size = event->size; | ||||
PluginClass::writeMidiEvent(&midiEvent); | |||||
NativePluginClass::writeMidiEvent(&midiEvent); | |||||
} | } | ||||
private: | private: | ||||
@@ -232,10 +232,10 @@ private: | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static const PluginDescriptor midiSequencerDesc = { | |||||
static const NativePluginDescriptor midiSequencerDesc = { | |||||
/* category */ PLUGIN_CATEGORY_UTILITY, | /* category */ PLUGIN_CATEGORY_UTILITY, | ||||
/* hints */ PLUGIN_IS_RTSAFE/*|PLUGIN_HAS_GUI*/, | /* hints */ PLUGIN_IS_RTSAFE/*|PLUGIN_HAS_GUI*/, | ||||
/* supports */ static_cast<PluginSupports>(0x0), | |||||
/* supports */ static_cast<NativePluginSupports>(0x0), | |||||
/* audioIns */ 0, | /* audioIns */ 0, | ||||
/* audioOuts */ 0, | /* audioOuts */ 0, | ||||
/* midiIns */ 1, | /* midiIns */ 1, | ||||
@@ -20,20 +20,20 @@ | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static PluginHandle midiSplit_instantiate(const HostDescriptor* host) | |||||
static NativePluginHandle midiSplit_instantiate(const NativeHostDescriptor* host) | |||||
{ | { | ||||
// use HostDescriptor as PluginHandle | // use HostDescriptor as PluginHandle | ||||
return (PluginHandle)host; | |||||
return (NativePluginHandle)host; | |||||
} | } | ||||
static void midiSplit_process(PluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const MidiEvent* midiEvents, uint32_t midiEventCount) | |||||
static void midiSplit_process(NativePluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const NativeMidiEvent* midiEvents, uint32_t midiEventCount) | |||||
{ | { | ||||
const HostDescriptor* const host = (const HostDescriptor*)handle; | |||||
MidiEvent tmpEvent; | |||||
const NativeHostDescriptor* const host = (const NativeHostDescriptor*)handle; | |||||
NativeMidiEvent tmpEvent; | |||||
for (uint32_t i=0; i < midiEventCount; ++i) | for (uint32_t i=0; i < midiEventCount; ++i) | ||||
{ | { | ||||
const MidiEvent* const midiEvent = &midiEvents[i]; | |||||
const NativeMidiEvent* const midiEvent = &midiEvents[i]; | |||||
const uint8_t status = MIDI_GET_STATUS_FROM_DATA(midiEvent->data); | const uint8_t status = MIDI_GET_STATUS_FROM_DATA(midiEvent->data); | ||||
const uint8_t channel = MIDI_GET_CHANNEL_FROM_DATA(midiEvent->data); | const uint8_t channel = MIDI_GET_CHANNEL_FROM_DATA(midiEvent->data); | ||||
@@ -62,7 +62,7 @@ static void midiSplit_process(PluginHandle handle, float** inBuffer, float** out | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static const PluginDescriptor midiSplitDesc = { | |||||
static const NativePluginDescriptor midiSplitDesc = { | |||||
.category = PLUGIN_CATEGORY_UTILITY, | .category = PLUGIN_CATEGORY_UTILITY, | ||||
.hints = PLUGIN_IS_RTSAFE, | .hints = PLUGIN_IS_RTSAFE, | ||||
.supports = PLUGIN_SUPPORTS_EVERYTHING, | .supports = PLUGIN_SUPPORTS_EVERYTHING, | ||||
@@ -20,15 +20,15 @@ | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static PluginHandle midiThrough_instantiate(const HostDescriptor* host) | |||||
static NativePluginHandle midiThrough_instantiate(const NativeHostDescriptor* host) | |||||
{ | { | ||||
// use HostDescriptor as PluginHandle | // use HostDescriptor as PluginHandle | ||||
return (PluginHandle)host; | |||||
return (NativePluginHandle)host; | |||||
} | } | ||||
static void midiThrough_process(PluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const MidiEvent* midiEvents, uint32_t midiEventCount) | |||||
static void midiThrough_process(NativePluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const NativeMidiEvent* midiEvents, uint32_t midiEventCount) | |||||
{ | { | ||||
const HostDescriptor* const host = (const HostDescriptor*)handle; | |||||
const NativeHostDescriptor* const host = (const NativeHostDescriptor*)handle; | |||||
for (uint32_t i=0; i < midiEventCount; ++i) | for (uint32_t i=0; i < midiEventCount; ++i) | ||||
host->write_midi_event(host->handle, &midiEvents[i]); | host->write_midi_event(host->handle, &midiEvents[i]); | ||||
@@ -43,7 +43,7 @@ static void midiThrough_process(PluginHandle handle, float** inBuffer, float** o | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static const PluginDescriptor midiThroughDesc = { | |||||
static const NativePluginDescriptor midiThroughDesc = { | |||||
.category = PLUGIN_CATEGORY_UTILITY, | .category = PLUGIN_CATEGORY_UTILITY, | ||||
.hints = PLUGIN_IS_RTSAFE, | .hints = PLUGIN_IS_RTSAFE, | ||||
.supports = PLUGIN_SUPPORTS_EVERYTHING, | .supports = PLUGIN_SUPPORTS_EVERYTHING, | ||||
@@ -23,13 +23,13 @@ | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
typedef struct { | typedef struct { | ||||
const HostDescriptor* host; | |||||
const NativeHostDescriptor* host; | |||||
int octaves; | int octaves; | ||||
} MidiTransposeHandle; | } MidiTransposeHandle; | ||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static PluginHandle midiTranspose_instantiate(const HostDescriptor* host) | |||||
static NativePluginHandle midiTranspose_instantiate(const NativeHostDescriptor* host) | |||||
{ | { | ||||
MidiTransposeHandle* const handle = (MidiTransposeHandle*)malloc(sizeof(MidiTransposeHandle)); | MidiTransposeHandle* const handle = (MidiTransposeHandle*)malloc(sizeof(MidiTransposeHandle)); | ||||
@@ -43,12 +43,12 @@ static PluginHandle midiTranspose_instantiate(const HostDescriptor* host) | |||||
#define handlePtr ((MidiTransposeHandle*)handle) | #define handlePtr ((MidiTransposeHandle*)handle) | ||||
static void midiTranspose_cleanup(PluginHandle handle) | |||||
static void midiTranspose_cleanup(NativePluginHandle handle) | |||||
{ | { | ||||
free(handlePtr); | free(handlePtr); | ||||
} | } | ||||
static uint32_t midiTranspose_get_parameter_count(PluginHandle handle) | |||||
static uint32_t midiTranspose_get_parameter_count(NativePluginHandle handle) | |||||
{ | { | ||||
return 1; | return 1; | ||||
@@ -56,12 +56,12 @@ static uint32_t midiTranspose_get_parameter_count(PluginHandle handle) | |||||
(void)handle; | (void)handle; | ||||
} | } | ||||
const Parameter* midiTranspose_get_parameter_info(PluginHandle handle, uint32_t index) | |||||
const NativeParameter* midiTranspose_get_parameter_info(NativePluginHandle handle, uint32_t index) | |||||
{ | { | ||||
if (index != 0) | if (index != 0) | ||||
return NULL; | return NULL; | ||||
static Parameter param; | |||||
static NativeParameter param; | |||||
param.name = "Octaves"; | param.name = "Octaves"; | ||||
param.unit = NULL; | param.unit = NULL; | ||||
@@ -81,7 +81,7 @@ const Parameter* midiTranspose_get_parameter_info(PluginHandle handle, uint32_t | |||||
(void)handle; | (void)handle; | ||||
} | } | ||||
static float midiTranspose_get_parameter_value(PluginHandle handle, uint32_t index) | |||||
static float midiTranspose_get_parameter_value(NativePluginHandle handle, uint32_t index) | |||||
{ | { | ||||
if (index != 0) | if (index != 0) | ||||
return 0.0f; | return 0.0f; | ||||
@@ -89,7 +89,7 @@ static float midiTranspose_get_parameter_value(PluginHandle handle, uint32_t ind | |||||
return (float)handlePtr->octaves; | return (float)handlePtr->octaves; | ||||
} | } | ||||
static void midiTranspose_set_parameter_value(PluginHandle handle, uint32_t index, float value) | |||||
static void midiTranspose_set_parameter_value(NativePluginHandle handle, uint32_t index, float value) | |||||
{ | { | ||||
if (index != 0) | if (index != 0) | ||||
return; | return; | ||||
@@ -97,15 +97,15 @@ static void midiTranspose_set_parameter_value(PluginHandle handle, uint32_t inde | |||||
handlePtr->octaves = (int)value; | handlePtr->octaves = (int)value; | ||||
} | } | ||||
static void midiTranspose_process(PluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const MidiEvent* midiEvents, uint32_t midiEventCount) | |||||
static void midiTranspose_process(NativePluginHandle handle, float** inBuffer, float** outBuffer, uint32_t frames, const NativeMidiEvent* midiEvents, uint32_t midiEventCount) | |||||
{ | { | ||||
const HostDescriptor* const host = handlePtr->host; | |||||
const NativeHostDescriptor* const host = handlePtr->host; | |||||
const int octaves = handlePtr->octaves; | const int octaves = handlePtr->octaves; | ||||
MidiEvent tmpEvent; | |||||
NativeMidiEvent tmpEvent; | |||||
for (uint32_t i=0; i < midiEventCount; ++i) | for (uint32_t i=0; i < midiEventCount; ++i) | ||||
{ | { | ||||
const MidiEvent* const midiEvent = &midiEvents[i]; | |||||
const NativeMidiEvent* const midiEvent = &midiEvents[i]; | |||||
const uint8_t status = MIDI_GET_STATUS_FROM_DATA(midiEvent->data); | const uint8_t status = MIDI_GET_STATUS_FROM_DATA(midiEvent->data); | ||||
@@ -143,7 +143,7 @@ static void midiTranspose_process(PluginHandle handle, float** inBuffer, float** | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static const PluginDescriptor midiTransposeDesc = { | |||||
static const NativePluginDescriptor midiTransposeDesc = { | |||||
.category = PLUGIN_CATEGORY_UTILITY, | .category = PLUGIN_CATEGORY_UTILITY, | ||||
.hints = PLUGIN_IS_RTSAFE, | .hints = PLUGIN_IS_RTSAFE, | ||||
.supports = PLUGIN_SUPPORTS_EVERYTHING, | .supports = PLUGIN_SUPPORTS_EVERYTHING, | ||||
@@ -26,10 +26,10 @@ | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static const PluginDescriptor nekofilterDesc = { | |||||
static const NativePluginDescriptor nekofilterDesc = { | |||||
.category = PLUGIN_CATEGORY_FILTER, | .category = PLUGIN_CATEGORY_FILTER, | ||||
#ifdef WANT_UI | #ifdef WANT_UI | ||||
.hints = PLUGIN_IS_RTSAFE|PLUGIN_HAS_GUI, | |||||
.hints = PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI, | |||||
#else | #else | ||||
.hints = PLUGIN_IS_RTSAFE, | .hints = PLUGIN_IS_RTSAFE, | ||||
#endif | #endif | ||||
@@ -47,15 +47,15 @@ struct nekofilter | |||||
filter_handle filter; | filter_handle filter; | ||||
float params_global[GLOBAL_PARAMETERS_COUNT]; | float params_global[GLOBAL_PARAMETERS_COUNT]; | ||||
float params_bands[BAND_PARAMETERS_COUNT*BANDS_COUNT]; | float params_bands[BAND_PARAMETERS_COUNT*BANDS_COUNT]; | ||||
const HostDescriptor* host; | |||||
const NativeHostDescriptor* host; | |||||
#ifdef WANT_UI | #ifdef WANT_UI | ||||
struct control* ui; | struct control* ui; | ||||
#endif | #endif | ||||
}; | }; | ||||
PluginHandle | |||||
NativePluginHandle | |||||
nekofilter_instantiate( | nekofilter_instantiate( | ||||
const HostDescriptor* host) | |||||
const NativeHostDescriptor* host) | |||||
{ | { | ||||
struct nekofilter * nekofilter_ptr; | struct nekofilter * nekofilter_ptr; | ||||
unsigned int i; | unsigned int i; | ||||
@@ -134,14 +134,14 @@ nekofilter_instantiate( | |||||
&nekofilter_ptr->params_bands[i*BAND_PARAMETERS_COUNT + BAND_PARAMETER_GAIN]); | &nekofilter_ptr->params_bands[i*BAND_PARAMETERS_COUNT + BAND_PARAMETER_GAIN]); | ||||
} | } | ||||
return (PluginHandle)nekofilter_ptr; | |||||
return (NativePluginHandle)nekofilter_ptr; | |||||
} | } | ||||
#define nekofilter_ptr ((struct nekofilter *)handle) | #define nekofilter_ptr ((struct nekofilter *)handle) | ||||
uint32_t | uint32_t | ||||
nekofilter_get_parameter_count( | nekofilter_get_parameter_count( | ||||
PluginHandle handle) | |||||
NativePluginHandle handle) | |||||
{ | { | ||||
return GLOBAL_PARAMETERS_COUNT + BAND_PARAMETERS_COUNT*BANDS_COUNT; | return GLOBAL_PARAMETERS_COUNT + BAND_PARAMETERS_COUNT*BANDS_COUNT; | ||||
@@ -149,12 +149,12 @@ nekofilter_get_parameter_count( | |||||
(void)handle; | (void)handle; | ||||
} | } | ||||
const Parameter* | |||||
const NativeParameter* | |||||
nekofilter_get_parameter_info( | nekofilter_get_parameter_info( | ||||
PluginHandle handle, | |||||
NativePluginHandle handle, | |||||
uint32_t index) | uint32_t index) | ||||
{ | { | ||||
static Parameter param; | |||||
static NativeParameter param; | |||||
static bool first_init = true; | static bool first_init = true; | ||||
uint32_t band; | uint32_t band; | ||||
char strBuf[32]; | char strBuf[32]; | ||||
@@ -288,7 +288,7 @@ ready: | |||||
float | float | ||||
nekofilter_get_parameter_value( | nekofilter_get_parameter_value( | ||||
PluginHandle handle, | |||||
NativePluginHandle handle, | |||||
uint32_t index) | uint32_t index) | ||||
{ | { | ||||
if (index < GLOBAL_PARAMETERS_COUNT) | if (index < GLOBAL_PARAMETERS_COUNT) | ||||
@@ -306,7 +306,7 @@ nekofilter_get_parameter_value( | |||||
void | void | ||||
nekofilter_set_parameter_value( | nekofilter_set_parameter_value( | ||||
PluginHandle handle, | |||||
NativePluginHandle handle, | |||||
uint32_t index, | uint32_t index, | ||||
float value) | float value) | ||||
{ | { | ||||
@@ -325,11 +325,11 @@ nekofilter_set_parameter_value( | |||||
void | void | ||||
nekofilter_process( | nekofilter_process( | ||||
PluginHandle handle, | |||||
NativePluginHandle handle, | |||||
float** inBuffer, | float** inBuffer, | ||||
float** outBuffer, | float** outBuffer, | ||||
uint32_t frames, | uint32_t frames, | ||||
const MidiEvent* midiEvents, | |||||
const NativeMidiEvent* midiEvents, | |||||
uint32_t midiEventCount) | uint32_t midiEventCount) | ||||
{ | { | ||||
LOG_DEBUG("nekofilter_run"); | LOG_DEBUG("nekofilter_run"); | ||||
@@ -348,7 +348,7 @@ nekofilter_process( | |||||
#ifdef WANT_UI | #ifdef WANT_UI | ||||
void nekofilter_ui_show( | void nekofilter_ui_show( | ||||
PluginHandle handle, | |||||
NativePluginHandle handle, | |||||
bool show) | bool show) | ||||
{ | { | ||||
if (show) | if (show) | ||||
@@ -365,14 +365,14 @@ void nekofilter_ui_show( | |||||
} | } | ||||
void nekofilter_ui_idle( | void nekofilter_ui_idle( | ||||
PluginHandle handle) | |||||
NativePluginHandle handle) | |||||
{ | { | ||||
if (nekofilter_ptr->ui != NULL) | if (nekofilter_ptr->ui != NULL) | ||||
nekoui_run(nekofilter_ptr->ui); | nekoui_run(nekofilter_ptr->ui); | ||||
} | } | ||||
void nekofilter_ui_set_parameter_value( | void nekofilter_ui_set_parameter_value( | ||||
PluginHandle handle, | |||||
NativePluginHandle handle, | |||||
uint32_t index, | uint32_t index, | ||||
float value) | float value) | ||||
{ | { | ||||
@@ -383,7 +383,7 @@ void nekofilter_ui_set_parameter_value( | |||||
void | void | ||||
nekofilter_cleanup( | nekofilter_cleanup( | ||||
PluginHandle handle) | |||||
NativePluginHandle handle) | |||||
{ | { | ||||
#ifdef WANT_UI | #ifdef WANT_UI | ||||
if (nekofilter_ptr->ui != NULL) | if (nekofilter_ptr->ui != NULL) | ||||
@@ -69,7 +69,7 @@ | |||||
struct control | struct control | ||||
{ | { | ||||
const HostDescriptor* host; | |||||
const NativeHostDescriptor* host; | |||||
bool running; /* true if UI launched and 'exiting' not received */ | bool running; /* true if UI launched and 'exiting' not received */ | ||||
bool visible; /* true if 'show' sent */ | bool visible; /* true if 'show' sent */ | ||||
@@ -365,7 +365,7 @@ static bool do_fork(const char * argv[6], int* ret) | |||||
static | static | ||||
struct control* | struct control* | ||||
nekoui_instantiate( | nekoui_instantiate( | ||||
const HostDescriptor* host) | |||||
const NativeHostDescriptor* host) | |||||
{ | { | ||||
struct control * control_ptr; | struct control * control_ptr; | ||||
char * filename; | char * filename; | ||||
@@ -30,7 +30,7 @@ using namespace juce; | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
class VexArpPlugin : public PluginClass, | |||||
class VexArpPlugin : public NativePluginClass, | |||||
public PeggyViewComponent::Callback | public PeggyViewComponent::Callback | ||||
{ | { | ||||
public: | public: | ||||
@@ -45,8 +45,8 @@ public: | |||||
kParamCount = kParamLast + VexArpSettings::kVelocitiesSize + VexArpSettings::kGridSize | kParamCount = kParamLast + VexArpSettings::kVelocitiesSize + VexArpSettings::kGridSize | ||||
}; | }; | ||||
VexArpPlugin(const HostDescriptor* const host) | |||||
: PluginClass(host), | |||||
VexArpPlugin(const NativeHostDescriptor* const host) | |||||
: NativePluginClass(host), | |||||
fArp(&fSettings), | fArp(&fSettings), | ||||
fNeedsUpdate(true) | fNeedsUpdate(true) | ||||
{ | { | ||||
@@ -63,10 +63,10 @@ protected: | |||||
return kParamCount; | return kParamCount; | ||||
} | } | ||||
const Parameter* getParameterInfo(const uint32_t index) const override | |||||
const NativeParameter* getParameterInfo(const uint32_t index) const override | |||||
{ | { | ||||
static Parameter paramInfo; | |||||
static ParameterScalePoint scalePoints[4]; | |||||
static NativeParameter paramInfo; | |||||
static NativeParameterScalePoint scalePoints[4]; | |||||
static char bufName[24+1]; | static char bufName[24+1]; | ||||
int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE; | int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE; | ||||
@@ -183,7 +183,7 @@ protected: | |||||
paramInfo.name = bufName; | paramInfo.name = bufName; | ||||
} | } | ||||
paramInfo.hints = static_cast<ParameterHints>(hints); | |||||
paramInfo.hints = static_cast<NativeParameterHints>(hints); | |||||
return ¶mInfo; | return ¶mInfo; | ||||
} | } | ||||
@@ -261,7 +261,7 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Plugin process calls | // Plugin process calls | ||||
void process(float**, float**, const uint32_t frames, const MidiEvent* const midiEvents, const uint32_t midiEventCount) override | |||||
void process(float**, float**, const uint32_t frames, const NativeMidiEvent* const midiEvents, const uint32_t midiEventCount) override | |||||
{ | { | ||||
if (! fSettings.on) | if (! fSettings.on) | ||||
{ | { | ||||
@@ -271,7 +271,7 @@ protected: | |||||
return; | return; | ||||
} | } | ||||
const TimeInfo* const timeInfo(getTimeInfo()); | |||||
const NativeTimeInfo* const timeInfo(getTimeInfo()); | |||||
bool timePlaying = false; | bool timePlaying = false; | ||||
double ppqPos = 0.0; | double ppqPos = 0.0; | ||||
@@ -298,7 +298,7 @@ protected: | |||||
for (uint32_t i=0; i < midiEventCount; ++i) | for (uint32_t i=0; i < midiEventCount; ++i) | ||||
{ | { | ||||
const MidiEvent* const midiEvent(&midiEvents[i]); | |||||
const NativeMidiEvent* const midiEvent(&midiEvents[i]); | |||||
fMidiInBuffer.addEvent(midiEvent->data, midiEvent->size, midiEvent->time); | fMidiInBuffer.addEvent(midiEvent->data, midiEvent->size, midiEvent->time); | ||||
} | } | ||||
@@ -309,7 +309,7 @@ protected: | |||||
int numBytes; | int numBytes; | ||||
int sampleNumber; | int sampleNumber; | ||||
MidiEvent tmpEvent; | |||||
NativeMidiEvent tmpEvent; | |||||
tmpEvent.port = 0; | tmpEvent.port = 0; | ||||
while (outBufferIterator.getNextEvent(midiData, numBytes, sampleNumber)) | while (outBufferIterator.getNextEvent(midiData, numBytes, sampleNumber)) | ||||
@@ -429,7 +429,7 @@ private: | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
class VexChorusPlugin : public PluginClass | |||||
class VexChorusPlugin : public NativePluginClass | |||||
{ | { | ||||
public: | public: | ||||
enum Params { | enum Params { | ||||
@@ -438,8 +438,8 @@ public: | |||||
kParamCount | kParamCount | ||||
}; | }; | ||||
VexChorusPlugin(const HostDescriptor* const host) | |||||
: PluginClass(host), | |||||
VexChorusPlugin(const NativeHostDescriptor* const host) | |||||
: NativePluginClass(host), | |||||
fChorus(fParameters) | fChorus(fParameters) | ||||
{ | { | ||||
std::memset(fParameters, 0, sizeof(float)*92); | std::memset(fParameters, 0, sizeof(float)*92); | ||||
@@ -459,9 +459,9 @@ protected: | |||||
return kParamCount; | return kParamCount; | ||||
} | } | ||||
const Parameter* getParameterInfo(const uint32_t index) const override | |||||
const NativeParameter* getParameterInfo(const uint32_t index) const override | |||||
{ | { | ||||
static Parameter paramInfo; | |||||
static NativeParameter paramInfo; | |||||
int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE; | int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE; | ||||
@@ -488,7 +488,7 @@ protected: | |||||
break; | break; | ||||
} | } | ||||
paramInfo.hints = static_cast<ParameterHints>(hints); | |||||
paramInfo.hints = static_cast<NativeParameterHints>(hints); | |||||
return ¶mInfo; | return ¶mInfo; | ||||
} | } | ||||
@@ -527,7 +527,7 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Plugin process calls | // Plugin process calls | ||||
void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, const MidiEvent* const, const uint32_t) override | |||||
void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, const NativeMidiEvent* const, const uint32_t) override | |||||
{ | { | ||||
if (inBuffer[0] != outBuffer[0]) | if (inBuffer[0] != outBuffer[0]) | ||||
FloatVectorOperations::copy(outBuffer[0], inBuffer[0], frames); | FloatVectorOperations::copy(outBuffer[0], inBuffer[0], frames); | ||||
@@ -555,7 +555,7 @@ private: | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
class VexDelayPlugin : public PluginClass | |||||
class VexDelayPlugin : public NativePluginClass | |||||
{ | { | ||||
public: | public: | ||||
enum Params { | enum Params { | ||||
@@ -564,8 +564,8 @@ public: | |||||
kParamCount | kParamCount | ||||
}; | }; | ||||
VexDelayPlugin(const HostDescriptor* const host) | |||||
: PluginClass(host), | |||||
VexDelayPlugin(const NativeHostDescriptor* const host) | |||||
: NativePluginClass(host), | |||||
fDelay(fParameters) | fDelay(fParameters) | ||||
{ | { | ||||
std::memset(fParameters, 0, sizeof(float)*92); | std::memset(fParameters, 0, sizeof(float)*92); | ||||
@@ -585,9 +585,9 @@ protected: | |||||
return kParamCount; | return kParamCount; | ||||
} | } | ||||
const Parameter* getParameterInfo(const uint32_t index) const override | |||||
const NativeParameter* getParameterInfo(const uint32_t index) const override | |||||
{ | { | ||||
static Parameter paramInfo; | |||||
static NativeParameter paramInfo; | |||||
int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE; | int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE; | ||||
@@ -621,7 +621,7 @@ protected: | |||||
break; | break; | ||||
} | } | ||||
paramInfo.hints = static_cast<ParameterHints>(hints); | |||||
paramInfo.hints = static_cast<NativeParameterHints>(hints); | |||||
return ¶mInfo; | return ¶mInfo; | ||||
} | } | ||||
@@ -660,14 +660,14 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Plugin process calls | // Plugin process calls | ||||
void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, const MidiEvent* const, const uint32_t) override | |||||
void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, const NativeMidiEvent* const, const uint32_t) override | |||||
{ | { | ||||
if (inBuffer[0] != outBuffer[0]) | if (inBuffer[0] != outBuffer[0]) | ||||
FloatVectorOperations::copy(outBuffer[0], inBuffer[0], frames); | FloatVectorOperations::copy(outBuffer[0], inBuffer[0], frames); | ||||
if (inBuffer[1] != outBuffer[1]) | if (inBuffer[1] != outBuffer[1]) | ||||
FloatVectorOperations::copy(outBuffer[1], inBuffer[1], frames); | FloatVectorOperations::copy(outBuffer[1], inBuffer[1], frames); | ||||
const TimeInfo* const timeInfo(getTimeInfo()); | |||||
const NativeTimeInfo* const timeInfo(getTimeInfo()); | |||||
const double bpm((timeInfo != nullptr && timeInfo->bbt.valid) ? timeInfo->bbt.beatsPerMinute : 120.0); | const double bpm((timeInfo != nullptr && timeInfo->bbt.valid) ? timeInfo->bbt.beatsPerMinute : 120.0); | ||||
fDelay.processBlock(outBuffer[0], outBuffer[1], frames, bpm); | fDelay.processBlock(outBuffer[0], outBuffer[1], frames, bpm); | ||||
@@ -691,7 +691,7 @@ private: | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
class VexReverbPlugin : public PluginClass | |||||
class VexReverbPlugin : public NativePluginClass | |||||
{ | { | ||||
public: | public: | ||||
enum Params { | enum Params { | ||||
@@ -701,8 +701,8 @@ public: | |||||
kParamCount | kParamCount | ||||
}; | }; | ||||
VexReverbPlugin(const HostDescriptor* const host) | |||||
: PluginClass(host), | |||||
VexReverbPlugin(const NativeHostDescriptor* const host) | |||||
: NativePluginClass(host), | |||||
fReverb(fParameters) | fReverb(fParameters) | ||||
{ | { | ||||
std::memset(fParameters, 0, sizeof(float)*92); | std::memset(fParameters, 0, sizeof(float)*92); | ||||
@@ -721,9 +721,9 @@ protected: | |||||
return kParamCount; | return kParamCount; | ||||
} | } | ||||
const Parameter* getParameterInfo(const uint32_t index) const override | |||||
const NativeParameter* getParameterInfo(const uint32_t index) const override | |||||
{ | { | ||||
static Parameter paramInfo; | |||||
static NativeParameter paramInfo; | |||||
int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE; | int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE; | ||||
@@ -754,7 +754,7 @@ protected: | |||||
break; | break; | ||||
} | } | ||||
paramInfo.hints = static_cast<ParameterHints>(hints); | |||||
paramInfo.hints = static_cast<NativeParameterHints>(hints); | |||||
return ¶mInfo; | return ¶mInfo; | ||||
} | } | ||||
@@ -798,7 +798,7 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Plugin process calls | // Plugin process calls | ||||
void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, const MidiEvent* const, const uint32_t) override | |||||
void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, const NativeMidiEvent* const, const uint32_t) override | |||||
{ | { | ||||
for (uint32_t i=0; i< frames; ++i) | for (uint32_t i=0; i< frames; ++i) | ||||
FloatVectorOperations::copyWithMultiply(outBuffer[0], inBuffer[0], 0.5f, frames); | FloatVectorOperations::copyWithMultiply(outBuffer[0], inBuffer[0], 0.5f, frames); | ||||
@@ -818,10 +818,10 @@ private: | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static const PluginDescriptor vexArpDesc = { | |||||
static const NativePluginDescriptor vexArpDesc = { | |||||
/* category */ PLUGIN_CATEGORY_UTILITY, | /* category */ PLUGIN_CATEGORY_UTILITY, | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_HAS_GUI|PLUGIN_NEEDS_UI_JUCE|PLUGIN_USES_TIME), | |||||
/* supports */ static_cast<PluginSupports>(PLUGIN_SUPPORTS_EVERYTHING), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_HAS_UI|PLUGIN_NEEDS_UI_JUCE|PLUGIN_USES_TIME), | |||||
/* supports */ static_cast<NativePluginSupports>(PLUGIN_SUPPORTS_EVERYTHING), | |||||
/* audioIns */ 0, | /* audioIns */ 0, | ||||
/* audioOuts */ 0, | /* audioOuts */ 0, | ||||
/* midiIns */ 1, | /* midiIns */ 1, | ||||
@@ -835,10 +835,10 @@ static const PluginDescriptor vexArpDesc = { | |||||
PluginDescriptorFILL(VexArpPlugin) | PluginDescriptorFILL(VexArpPlugin) | ||||
}; | }; | ||||
static const PluginDescriptor vexChorusDesc = { | |||||
static const NativePluginDescriptor vexChorusDesc = { | |||||
/* category */ PLUGIN_CATEGORY_MODULATOR, | /* category */ PLUGIN_CATEGORY_MODULATOR, | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_IS_RTSAFE), | |||||
/* supports */ static_cast<PluginSupports>(0x0), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE), | |||||
/* supports */ static_cast<NativePluginSupports>(0x0), | |||||
/* audioIns */ 2, | /* audioIns */ 2, | ||||
/* audioOuts */ 2, | /* audioOuts */ 2, | ||||
/* midiIns */ 0, | /* midiIns */ 0, | ||||
@@ -852,10 +852,10 @@ static const PluginDescriptor vexChorusDesc = { | |||||
PluginDescriptorFILL(VexChorusPlugin) | PluginDescriptorFILL(VexChorusPlugin) | ||||
}; | }; | ||||
static const PluginDescriptor vexDelayDesc = { | |||||
static const NativePluginDescriptor vexDelayDesc = { | |||||
/* category */ PLUGIN_CATEGORY_DELAY, | /* category */ PLUGIN_CATEGORY_DELAY, | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_USES_TIME), | |||||
/* supports */ static_cast<PluginSupports>(0x0), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_USES_TIME), | |||||
/* supports */ static_cast<NativePluginSupports>(0x0), | |||||
/* audioIns */ 2, | /* audioIns */ 2, | ||||
/* audioOuts */ 2, | /* audioOuts */ 2, | ||||
/* midiIns */ 0, | /* midiIns */ 0, | ||||
@@ -869,10 +869,10 @@ static const PluginDescriptor vexDelayDesc = { | |||||
PluginDescriptorFILL(VexDelayPlugin) | PluginDescriptorFILL(VexDelayPlugin) | ||||
}; | }; | ||||
static const PluginDescriptor vexReverbDesc = { | |||||
static const NativePluginDescriptor vexReverbDesc = { | |||||
/* category */ PLUGIN_CATEGORY_DELAY, | /* category */ PLUGIN_CATEGORY_DELAY, | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_IS_RTSAFE), | |||||
/* supports */ static_cast<PluginSupports>(0x0), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE), | |||||
/* supports */ static_cast<NativePluginSupports>(0x0), | |||||
/* audioIns */ 2, | /* audioIns */ 2, | ||||
/* audioOuts */ 2, | /* audioOuts */ 2, | ||||
/* midiIns */ 0, | /* midiIns */ 0, | ||||
@@ -32,11 +32,11 @@ using juce::FloatVectorOperations; | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
class FxAbstractPlugin : public PluginClass | |||||
class FxAbstractPlugin : public NativePluginClass | |||||
{ | { | ||||
protected: | protected: | ||||
FxAbstractPlugin(const HostDescriptor* const host, const uint32_t paramCount, const uint32_t programCount) | |||||
: PluginClass(host), | |||||
FxAbstractPlugin(const NativeHostDescriptor* const host, const uint32_t paramCount, const uint32_t programCount) | |||||
: NativePluginClass(host), | |||||
fParamCount(paramCount-2), // volume and pan handled by host | fParamCount(paramCount-2), // volume and pan handled by host | ||||
fProgramCount(programCount), | fProgramCount(programCount), | ||||
fEffect(nullptr), | fEffect(nullptr), | ||||
@@ -135,7 +135,7 @@ protected: | |||||
} | } | ||||
} | } | ||||
void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, const MidiEvent* const, const uint32_t) final | |||||
void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, const NativeMidiEvent* const, const uint32_t) final | |||||
{ | { | ||||
fEffect->out(Stereo<float*>(inBuffer[0], inBuffer[1])); | fEffect->out(Stereo<float*>(inBuffer[0], inBuffer[1])); | ||||
@@ -199,7 +199,7 @@ protected: | |||||
class FxAlienWahPlugin : public FxAbstractPlugin | class FxAlienWahPlugin : public FxAbstractPlugin | ||||
{ | { | ||||
public: | public: | ||||
FxAlienWahPlugin(const HostDescriptor* const host) | |||||
FxAlienWahPlugin(const NativeHostDescriptor* const host) | |||||
: FxAbstractPlugin(host, 11, 4) | : FxAbstractPlugin(host, 11, 4) | ||||
{ | { | ||||
fEffect = new Alienwah(false, efxoutl, efxoutr, getSampleRate(), getBufferSize()); | fEffect = new Alienwah(false, efxoutl, efxoutr, getSampleRate(), getBufferSize()); | ||||
@@ -209,13 +209,13 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Plugin parameter calls | // Plugin parameter calls | ||||
const Parameter* getParameterInfo(const uint32_t index) const override | |||||
const NativeParameter* getParameterInfo(const uint32_t index) const override | |||||
{ | { | ||||
if (index >= fParamCount) | if (index >= fParamCount) | ||||
return nullptr; | return nullptr; | ||||
static Parameter param; | |||||
static ParameterScalePoint scalePoints[2]; | |||||
static NativeParameter param; | |||||
static NativeParameterScalePoint scalePoints[2]; | |||||
int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_INTEGER; | int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_INTEGER; | ||||
@@ -287,7 +287,7 @@ protected: | |||||
break; | break; | ||||
} | } | ||||
param.hints = static_cast<ParameterHints>(hints); | |||||
param.hints = static_cast<NativeParameterHints>(hints); | |||||
return ¶m; | return ¶m; | ||||
} | } | ||||
@@ -295,12 +295,12 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Plugin midi-program calls | // Plugin midi-program calls | ||||
const MidiProgram* getMidiProgramInfo(const uint32_t index) const override | |||||
const NativeMidiProgram* getMidiProgramInfo(const uint32_t index) const override | |||||
{ | { | ||||
if (index >= fProgramCount) | if (index >= fProgramCount) | ||||
return nullptr; | return nullptr; | ||||
static MidiProgram midiProg; | |||||
static NativeMidiProgram midiProg; | |||||
midiProg.bank = 0; | midiProg.bank = 0; | ||||
midiProg.program = index; | midiProg.program = index; | ||||
@@ -344,7 +344,7 @@ protected: | |||||
class FxChorusPlugin : public FxAbstractPlugin | class FxChorusPlugin : public FxAbstractPlugin | ||||
{ | { | ||||
public: | public: | ||||
FxChorusPlugin(const HostDescriptor* const host) | |||||
FxChorusPlugin(const NativeHostDescriptor* const host) | |||||
: FxAbstractPlugin(host, 12, 10) | : FxAbstractPlugin(host, 12, 10) | ||||
{ | { | ||||
fEffect = new Chorus(false, efxoutl, efxoutr, getSampleRate(), getBufferSize()); | fEffect = new Chorus(false, efxoutl, efxoutr, getSampleRate(), getBufferSize()); | ||||
@@ -354,13 +354,13 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Plugin parameter calls | // Plugin parameter calls | ||||
const Parameter* getParameterInfo(const uint32_t index) const override | |||||
const NativeParameter* getParameterInfo(const uint32_t index) const override | |||||
{ | { | ||||
if (index >= fParamCount) | if (index >= fParamCount) | ||||
return nullptr; | return nullptr; | ||||
static Parameter param; | |||||
static ParameterScalePoint scalePoints[2]; | |||||
static NativeParameter param; | |||||
static NativeParameterScalePoint scalePoints[2]; | |||||
int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_INTEGER; | int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_INTEGER; | ||||
@@ -438,7 +438,7 @@ protected: | |||||
break; | break; | ||||
} | } | ||||
param.hints = static_cast<ParameterHints>(hints); | |||||
param.hints = static_cast<NativeParameterHints>(hints); | |||||
return ¶m; | return ¶m; | ||||
} | } | ||||
@@ -446,12 +446,12 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Plugin midi-program calls | // Plugin midi-program calls | ||||
const MidiProgram* getMidiProgramInfo(const uint32_t index) const override | |||||
const NativeMidiProgram* getMidiProgramInfo(const uint32_t index) const override | |||||
{ | { | ||||
if (index >= fProgramCount) | if (index >= fProgramCount) | ||||
return nullptr; | return nullptr; | ||||
static MidiProgram midiProg; | |||||
static NativeMidiProgram midiProg; | |||||
midiProg.bank = 0; | midiProg.bank = 0; | ||||
midiProg.program = index; | midiProg.program = index; | ||||
@@ -513,7 +513,7 @@ protected: | |||||
class FxDistortionPlugin : public FxAbstractPlugin | class FxDistortionPlugin : public FxAbstractPlugin | ||||
{ | { | ||||
public: | public: | ||||
FxDistortionPlugin(const HostDescriptor* const host) | |||||
FxDistortionPlugin(const NativeHostDescriptor* const host) | |||||
: FxAbstractPlugin(host, 11, 6) | : FxAbstractPlugin(host, 11, 6) | ||||
{ | { | ||||
fEffect = new Distorsion(false, efxoutl, efxoutr, getSampleRate(), getBufferSize()); | fEffect = new Distorsion(false, efxoutl, efxoutr, getSampleRate(), getBufferSize()); | ||||
@@ -523,13 +523,13 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Plugin parameter calls | // Plugin parameter calls | ||||
const Parameter* getParameterInfo(const uint32_t index) const override | |||||
const NativeParameter* getParameterInfo(const uint32_t index) const override | |||||
{ | { | ||||
if (index >= fParamCount) | if (index >= fParamCount) | ||||
return nullptr; | return nullptr; | ||||
static Parameter param; | |||||
static ParameterScalePoint scalePoints[14]; | |||||
static NativeParameter param; | |||||
static NativeParameterScalePoint scalePoints[14]; | |||||
int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_INTEGER; | int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_INTEGER; | ||||
@@ -627,7 +627,7 @@ protected: | |||||
break; | break; | ||||
} | } | ||||
param.hints = static_cast<ParameterHints>(hints); | |||||
param.hints = static_cast<NativeParameterHints>(hints); | |||||
return ¶m; | return ¶m; | ||||
} | } | ||||
@@ -635,12 +635,12 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Plugin midi-program calls | // Plugin midi-program calls | ||||
const MidiProgram* getMidiProgramInfo(const uint32_t index) const override | |||||
const NativeMidiProgram* getMidiProgramInfo(const uint32_t index) const override | |||||
{ | { | ||||
if (index >= fProgramCount) | if (index >= fProgramCount) | ||||
return nullptr; | return nullptr; | ||||
static MidiProgram midiProg; | |||||
static NativeMidiProgram midiProg; | |||||
midiProg.bank = 0; | midiProg.bank = 0; | ||||
midiProg.program = index; | midiProg.program = index; | ||||
@@ -690,7 +690,7 @@ protected: | |||||
class FxDynamicFilterPlugin : public FxAbstractPlugin | class FxDynamicFilterPlugin : public FxAbstractPlugin | ||||
{ | { | ||||
public: | public: | ||||
FxDynamicFilterPlugin(const HostDescriptor* const host) | |||||
FxDynamicFilterPlugin(const NativeHostDescriptor* const host) | |||||
: FxAbstractPlugin(host, 10, 5) | : FxAbstractPlugin(host, 10, 5) | ||||
{ | { | ||||
fEffect = new DynamicFilter(false, efxoutl, efxoutr, getSampleRate(), getBufferSize()); | fEffect = new DynamicFilter(false, efxoutl, efxoutr, getSampleRate(), getBufferSize()); | ||||
@@ -700,13 +700,13 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Plugin parameter calls | // Plugin parameter calls | ||||
const Parameter* getParameterInfo(const uint32_t index) const override | |||||
const NativeParameter* getParameterInfo(const uint32_t index) const override | |||||
{ | { | ||||
if (index >= fParamCount) | if (index >= fParamCount) | ||||
return nullptr; | return nullptr; | ||||
static Parameter param; | |||||
static ParameterScalePoint scalePoints[2]; | |||||
static NativeParameter param; | |||||
static NativeParameterScalePoint scalePoints[2]; | |||||
int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_INTEGER; | int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_INTEGER; | ||||
@@ -773,7 +773,7 @@ protected: | |||||
break; | break; | ||||
} | } | ||||
param.hints = static_cast<ParameterHints>(hints); | |||||
param.hints = static_cast<NativeParameterHints>(hints); | |||||
return ¶m; | return ¶m; | ||||
} | } | ||||
@@ -781,12 +781,12 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Plugin midi-program calls | // Plugin midi-program calls | ||||
const MidiProgram* getMidiProgramInfo(const uint32_t index) const override | |||||
const NativeMidiProgram* getMidiProgramInfo(const uint32_t index) const override | |||||
{ | { | ||||
if (index >= fProgramCount) | if (index >= fProgramCount) | ||||
return nullptr; | return nullptr; | ||||
static MidiProgram midiProg; | |||||
static NativeMidiProgram midiProg; | |||||
midiProg.bank = 0; | midiProg.bank = 0; | ||||
midiProg.program = index; | midiProg.program = index; | ||||
@@ -833,7 +833,7 @@ protected: | |||||
class FxEchoPlugin : public FxAbstractPlugin | class FxEchoPlugin : public FxAbstractPlugin | ||||
{ | { | ||||
public: | public: | ||||
FxEchoPlugin(const HostDescriptor* const host) | |||||
FxEchoPlugin(const NativeHostDescriptor* const host) | |||||
: FxAbstractPlugin(host, 7, 9) | : FxAbstractPlugin(host, 7, 9) | ||||
{ | { | ||||
fEffect = new Echo(false, efxoutl, efxoutr, getSampleRate(), getBufferSize()); | fEffect = new Echo(false, efxoutl, efxoutr, getSampleRate(), getBufferSize()); | ||||
@@ -843,12 +843,12 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Plugin parameter calls | // Plugin parameter calls | ||||
const Parameter* getParameterInfo(const uint32_t index) const override | |||||
const NativeParameter* getParameterInfo(const uint32_t index) const override | |||||
{ | { | ||||
if (index >= fParamCount) | if (index >= fParamCount) | ||||
return nullptr; | return nullptr; | ||||
static Parameter param; | |||||
static NativeParameter param; | |||||
int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_INTEGER; | int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_INTEGER; | ||||
@@ -892,7 +892,7 @@ protected: | |||||
break; | break; | ||||
} | } | ||||
param.hints = static_cast<ParameterHints>(hints); | |||||
param.hints = static_cast<NativeParameterHints>(hints); | |||||
return ¶m; | return ¶m; | ||||
} | } | ||||
@@ -900,12 +900,12 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Plugin midi-program calls | // Plugin midi-program calls | ||||
const MidiProgram* getMidiProgramInfo(const uint32_t index) const override | |||||
const NativeMidiProgram* getMidiProgramInfo(const uint32_t index) const override | |||||
{ | { | ||||
if (index >= fProgramCount) | if (index >= fProgramCount) | ||||
return nullptr; | return nullptr; | ||||
static MidiProgram midiProg; | |||||
static NativeMidiProgram midiProg; | |||||
midiProg.bank = 0; | midiProg.bank = 0; | ||||
midiProg.program = index; | midiProg.program = index; | ||||
@@ -964,7 +964,7 @@ protected: | |||||
class FxPhaserPlugin : public FxAbstractPlugin | class FxPhaserPlugin : public FxAbstractPlugin | ||||
{ | { | ||||
public: | public: | ||||
FxPhaserPlugin(const HostDescriptor* const host) | |||||
FxPhaserPlugin(const NativeHostDescriptor* const host) | |||||
: FxAbstractPlugin(host, 15, 12) | : FxAbstractPlugin(host, 15, 12) | ||||
{ | { | ||||
fEffect = new Phaser(false, efxoutl, efxoutr, getSampleRate(), getBufferSize()); | fEffect = new Phaser(false, efxoutl, efxoutr, getSampleRate(), getBufferSize()); | ||||
@@ -974,13 +974,13 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Plugin parameter calls | // Plugin parameter calls | ||||
const Parameter* getParameterInfo(const uint32_t index) const override | |||||
const NativeParameter* getParameterInfo(const uint32_t index) const override | |||||
{ | { | ||||
if (index >= fParamCount) | if (index >= fParamCount) | ||||
return nullptr; | return nullptr; | ||||
static Parameter param; | |||||
static ParameterScalePoint scalePoints[2]; | |||||
static NativeParameter param; | |||||
static NativeParameterScalePoint scalePoints[2]; | |||||
int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_INTEGER; | int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_INTEGER; | ||||
@@ -1075,7 +1075,7 @@ protected: | |||||
break; | break; | ||||
} | } | ||||
param.hints = static_cast<ParameterHints>(hints); | |||||
param.hints = static_cast<NativeParameterHints>(hints); | |||||
return ¶m; | return ¶m; | ||||
} | } | ||||
@@ -1083,12 +1083,12 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Plugin midi-program calls | // Plugin midi-program calls | ||||
const MidiProgram* getMidiProgramInfo(const uint32_t index) const override | |||||
const NativeMidiProgram* getMidiProgramInfo(const uint32_t index) const override | |||||
{ | { | ||||
if (index >= fProgramCount) | if (index >= fProgramCount) | ||||
return nullptr; | return nullptr; | ||||
static MidiProgram midiProg; | |||||
static NativeMidiProgram midiProg; | |||||
midiProg.bank = 0; | midiProg.bank = 0; | ||||
midiProg.program = index; | midiProg.program = index; | ||||
@@ -1156,7 +1156,7 @@ protected: | |||||
class FxReverbPlugin : public FxAbstractPlugin | class FxReverbPlugin : public FxAbstractPlugin | ||||
{ | { | ||||
public: | public: | ||||
FxReverbPlugin(const HostDescriptor* const host) | |||||
FxReverbPlugin(const NativeHostDescriptor* const host) | |||||
: FxAbstractPlugin(host, 13, 13) | : FxAbstractPlugin(host, 13, 13) | ||||
{ | { | ||||
fEffect = new Reverb(false, efxoutl, efxoutr, getSampleRate(), getBufferSize()); | fEffect = new Reverb(false, efxoutl, efxoutr, getSampleRate(), getBufferSize()); | ||||
@@ -1166,13 +1166,13 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Plugin parameter calls | // Plugin parameter calls | ||||
const Parameter* getParameterInfo(const uint32_t index) const override | |||||
const NativeParameter* getParameterInfo(const uint32_t index) const override | |||||
{ | { | ||||
if (index >= fParamCount) | if (index >= fParamCount) | ||||
return nullptr; | return nullptr; | ||||
static Parameter param; | |||||
static ParameterScalePoint scalePoints[3]; | |||||
static NativeParameter param; | |||||
static NativeParameterScalePoint scalePoints[3]; | |||||
int hints = PARAMETER_IS_ENABLED | PARAMETER_IS_INTEGER; | int hints = PARAMETER_IS_ENABLED | PARAMETER_IS_INTEGER; | ||||
@@ -1250,7 +1250,7 @@ protected: | |||||
break; | break; | ||||
} | } | ||||
param.hints = static_cast<ParameterHints>(hints); | |||||
param.hints = static_cast<NativeParameterHints>(hints); | |||||
return ¶m; | return ¶m; | ||||
} | } | ||||
@@ -1258,12 +1258,12 @@ protected: | |||||
// ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
// Plugin midi-program calls | // Plugin midi-program calls | ||||
const MidiProgram* getMidiProgramInfo(const uint32_t index) const override | |||||
const NativeMidiProgram* getMidiProgramInfo(const uint32_t index) const override | |||||
{ | { | ||||
if (index >= fProgramCount) | if (index >= fProgramCount) | ||||
return nullptr; | return nullptr; | ||||
static MidiProgram midiProg; | |||||
static NativeMidiProgram midiProg; | |||||
midiProg.bank = 0; | midiProg.bank = 0; | ||||
midiProg.program = index; | midiProg.program = index; | ||||
@@ -1331,10 +1331,10 @@ protected: | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static const PluginDescriptor fxAlienWahDesc = { | |||||
static const NativePluginDescriptor fxAlienWahDesc = { | |||||
/* category */ PLUGIN_CATEGORY_MODULATOR, | /* category */ PLUGIN_CATEGORY_MODULATOR, | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_USES_PANNING|PLUGIN_NEEDS_FIXED_BUFFERS), | |||||
/* supports */ static_cast<PluginSupports>(0x0), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_USES_PANNING|PLUGIN_NEEDS_FIXED_BUFFERS), | |||||
/* supports */ static_cast<NativePluginSupports>(0x0), | |||||
/* audioIns */ 2, | /* audioIns */ 2, | ||||
/* audioOuts */ 2, | /* audioOuts */ 2, | ||||
/* midiIns */ 0, | /* midiIns */ 0, | ||||
@@ -1348,10 +1348,10 @@ static const PluginDescriptor fxAlienWahDesc = { | |||||
PluginDescriptorFILL(FxAlienWahPlugin) | PluginDescriptorFILL(FxAlienWahPlugin) | ||||
}; | }; | ||||
static const PluginDescriptor fxChorusDesc = { | |||||
static const NativePluginDescriptor fxChorusDesc = { | |||||
/* category */ PLUGIN_CATEGORY_MODULATOR, | /* category */ PLUGIN_CATEGORY_MODULATOR, | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_USES_PANNING|PLUGIN_NEEDS_FIXED_BUFFERS), | |||||
/* supports */ static_cast<PluginSupports>(0x0), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_USES_PANNING|PLUGIN_NEEDS_FIXED_BUFFERS), | |||||
/* supports */ static_cast<NativePluginSupports>(0x0), | |||||
/* audioIns */ 2, | /* audioIns */ 2, | ||||
/* audioOuts */ 2, | /* audioOuts */ 2, | ||||
/* midiIns */ 0, | /* midiIns */ 0, | ||||
@@ -1365,10 +1365,10 @@ static const PluginDescriptor fxChorusDesc = { | |||||
PluginDescriptorFILL(FxChorusPlugin) | PluginDescriptorFILL(FxChorusPlugin) | ||||
}; | }; | ||||
static const PluginDescriptor fxDistortionDesc = { | |||||
static const NativePluginDescriptor fxDistortionDesc = { | |||||
/* category */ PLUGIN_CATEGORY_MODULATOR, | /* category */ PLUGIN_CATEGORY_MODULATOR, | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_USES_PANNING|PLUGIN_NEEDS_FIXED_BUFFERS), | |||||
/* supports */ static_cast<PluginSupports>(0x0), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_USES_PANNING|PLUGIN_NEEDS_FIXED_BUFFERS), | |||||
/* supports */ static_cast<NativePluginSupports>(0x0), | |||||
/* audioIns */ 2, | /* audioIns */ 2, | ||||
/* audioOuts */ 2, | /* audioOuts */ 2, | ||||
/* midiIns */ 0, | /* midiIns */ 0, | ||||
@@ -1382,10 +1382,10 @@ static const PluginDescriptor fxDistortionDesc = { | |||||
PluginDescriptorFILL(FxDistortionPlugin) | PluginDescriptorFILL(FxDistortionPlugin) | ||||
}; | }; | ||||
static const PluginDescriptor fxDynamicFilterDesc = { | |||||
static const NativePluginDescriptor fxDynamicFilterDesc = { | |||||
/* category */ PLUGIN_CATEGORY_FILTER, | /* category */ PLUGIN_CATEGORY_FILTER, | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_USES_PANNING|PLUGIN_NEEDS_FIXED_BUFFERS), | |||||
/* supports */ static_cast<PluginSupports>(0x0), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_USES_PANNING|PLUGIN_NEEDS_FIXED_BUFFERS), | |||||
/* supports */ static_cast<NativePluginSupports>(0x0), | |||||
/* audioIns */ 2, | /* audioIns */ 2, | ||||
/* audioOuts */ 2, | /* audioOuts */ 2, | ||||
/* midiIns */ 0, | /* midiIns */ 0, | ||||
@@ -1399,10 +1399,10 @@ static const PluginDescriptor fxDynamicFilterDesc = { | |||||
PluginDescriptorFILL(FxDynamicFilterPlugin) | PluginDescriptorFILL(FxDynamicFilterPlugin) | ||||
}; | }; | ||||
static const PluginDescriptor fxEchoDesc = { | |||||
static const NativePluginDescriptor fxEchoDesc = { | |||||
/* category */ PLUGIN_CATEGORY_DELAY, | /* category */ PLUGIN_CATEGORY_DELAY, | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_USES_PANNING|PLUGIN_NEEDS_FIXED_BUFFERS), | |||||
/* supports */ static_cast<PluginSupports>(0x0), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_USES_PANNING|PLUGIN_NEEDS_FIXED_BUFFERS), | |||||
/* supports */ static_cast<NativePluginSupports>(0x0), | |||||
/* audioIns */ 2, | /* audioIns */ 2, | ||||
/* audioOuts */ 2, | /* audioOuts */ 2, | ||||
/* midiIns */ 0, | /* midiIns */ 0, | ||||
@@ -1416,10 +1416,10 @@ static const PluginDescriptor fxEchoDesc = { | |||||
PluginDescriptorFILL(FxEchoPlugin) | PluginDescriptorFILL(FxEchoPlugin) | ||||
}; | }; | ||||
static const PluginDescriptor fxPhaserDesc = { | |||||
static const NativePluginDescriptor fxPhaserDesc = { | |||||
/* category */ PLUGIN_CATEGORY_MODULATOR, | /* category */ PLUGIN_CATEGORY_MODULATOR, | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_USES_PANNING|PLUGIN_NEEDS_FIXED_BUFFERS), | |||||
/* supports */ static_cast<PluginSupports>(0x0), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_USES_PANNING|PLUGIN_NEEDS_FIXED_BUFFERS), | |||||
/* supports */ static_cast<NativePluginSupports>(0x0), | |||||
/* audioIns */ 2, | /* audioIns */ 2, | ||||
/* audioOuts */ 2, | /* audioOuts */ 2, | ||||
/* midiIns */ 0, | /* midiIns */ 0, | ||||
@@ -1433,10 +1433,10 @@ static const PluginDescriptor fxPhaserDesc = { | |||||
PluginDescriptorFILL(FxPhaserPlugin) | PluginDescriptorFILL(FxPhaserPlugin) | ||||
}; | }; | ||||
static const PluginDescriptor fxReverbDesc = { | |||||
static const NativePluginDescriptor fxReverbDesc = { | |||||
/* category */ PLUGIN_CATEGORY_DELAY, | /* category */ PLUGIN_CATEGORY_DELAY, | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_USES_PANNING|PLUGIN_NEEDS_FIXED_BUFFERS), | |||||
/* supports */ static_cast<PluginSupports>(0x0), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_USES_PANNING|PLUGIN_NEEDS_FIXED_BUFFERS), | |||||
/* supports */ static_cast<NativePluginSupports>(0x0), | |||||
/* audioIns */ 2, | /* audioIns */ 2, | ||||
/* audioOuts */ 2, | /* audioOuts */ 2, | ||||
/* midiIns */ 0, | /* midiIns */ 0, | ||||
@@ -174,7 +174,7 @@ public: | |||||
return fPrograms.count(); | return fPrograms.count(); | ||||
} | } | ||||
const MidiProgram* getInfo(const uint32_t index) | |||||
const NativeMidiProgram* getInfo(const uint32_t index) | |||||
{ | { | ||||
if (index >= fPrograms.count()) | if (index >= fPrograms.count()) | ||||
return nullptr; | return nullptr; | ||||
@@ -218,7 +218,7 @@ private: | |||||
}; | }; | ||||
bool fInitiated; | bool fInitiated; | ||||
MidiProgram fRetProgram; | |||||
NativeMidiProgram fRetProgram; | |||||
List<const ProgramInfo*> fPrograms; | List<const ProgramInfo*> fPrograms; | ||||
CARLA_DECLARE_NON_COPY_CLASS(ZynAddSubFxPrograms) | CARLA_DECLARE_NON_COPY_CLASS(ZynAddSubFxPrograms) | ||||
@@ -241,7 +241,7 @@ public: | |||||
CARLA_ASSERT(fCount == 0); | CARLA_ASSERT(fCount == 0); | ||||
} | } | ||||
void addOne(const HostDescriptor* const host) | |||||
void addOne(const NativeHostDescriptor* const host) | |||||
{ | { | ||||
if (fCount++ == 0) | if (fCount++ == 0) | ||||
{ | { | ||||
@@ -278,7 +278,7 @@ public: | |||||
} | } | ||||
} | } | ||||
void reinit(const HostDescriptor* const host) | |||||
void reinit(const NativeHostDescriptor* const host) | |||||
{ | { | ||||
Master::deleteInstance(); | Master::deleteInstance(); | ||||
@@ -313,7 +313,7 @@ public: | |||||
Master::getInstance(); | Master::getInstance(); | ||||
} | } | ||||
void maybeReinit(const HostDescriptor* const host) | |||||
void maybeReinit(const NativeHostDescriptor* const host) | |||||
{ | { | ||||
if (host->get_buffer_size(host->handle) == static_cast<uint32_t>(synth->buffersize) && | if (host->get_buffer_size(host->handle) == static_cast<uint32_t>(synth->buffersize) && | ||||
host->get_sample_rate(host->handle) == static_cast<double>(synth->samplerate)) | host->get_sample_rate(host->handle) == static_cast<double>(synth->samplerate)) | ||||
@@ -335,7 +335,7 @@ static ZynAddSubFxInstanceCount sInstanceCount; | |||||
class ZynAddSubFxThread : public CarlaThread | class ZynAddSubFxThread : public CarlaThread | ||||
{ | { | ||||
public: | public: | ||||
ZynAddSubFxThread(Master* const master, const HostDescriptor* const host) | |||||
ZynAddSubFxThread(Master* const master, const NativeHostDescriptor* const host) | |||||
: CarlaThread("ZynAddSubFxThread"), | : CarlaThread("ZynAddSubFxThread"), | ||||
fMaster(master), | fMaster(master), | ||||
kHost(host), | kHost(host), | ||||
@@ -523,7 +523,7 @@ protected: | |||||
private: | private: | ||||
Master* fMaster; | Master* fMaster; | ||||
const HostDescriptor* const kHost; | |||||
const NativeHostDescriptor* const kHost; | |||||
#ifdef WANT_ZYNADDSUBFX_UI | #ifdef WANT_ZYNADDSUBFX_UI | ||||
MasterUI* fUi; | MasterUI* fUi; | ||||
@@ -539,11 +539,11 @@ private: | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
class ZynAddSubFxPlugin : public PluginClass | |||||
class ZynAddSubFxPlugin : public NativePluginClass | |||||
{ | { | ||||
public: | public: | ||||
ZynAddSubFxPlugin(const HostDescriptor* const host) | |||||
: PluginClass(host), | |||||
ZynAddSubFxPlugin(const NativeHostDescriptor* const host) | |||||
: NativePluginClass(host), | |||||
fMaster(new Master()), | fMaster(new Master()), | ||||
fSampleRate(getSampleRate()), | fSampleRate(getSampleRate()), | ||||
fIsActive(false), | fIsActive(false), | ||||
@@ -571,7 +571,7 @@ protected: | |||||
return sPrograms.count(); | return sPrograms.count(); | ||||
} | } | ||||
const MidiProgram* getMidiProgramInfo(const uint32_t index) const override | |||||
const NativeMidiProgram* getMidiProgramInfo(const uint32_t index) const override | |||||
{ | { | ||||
return sPrograms.getInfo(index); | return sPrograms.getInfo(index); | ||||
} | } | ||||
@@ -621,7 +621,7 @@ protected: | |||||
fIsActive = false; | fIsActive = false; | ||||
} | } | ||||
void process(float**, float** const outBuffer, const uint32_t frames, const MidiEvent* const midiEvents, const uint32_t midiEventCount) override | |||||
void process(float**, float** const outBuffer, const uint32_t frames, const NativeMidiEvent* const midiEvents, const uint32_t midiEventCount) override | |||||
{ | { | ||||
if (pthread_mutex_trylock(&fMaster->mutex) != 0) | if (pthread_mutex_trylock(&fMaster->mutex) != 0) | ||||
{ | { | ||||
@@ -637,7 +637,7 @@ protected: | |||||
for (uint32_t i=0; i < midiEventCount; ++i) | for (uint32_t i=0; i < midiEventCount; ++i) | ||||
{ | { | ||||
const MidiEvent* const midiEvent(&midiEvents[i]); | |||||
const NativeMidiEvent* const midiEvent(&midiEvents[i]); | |||||
const uint8_t status = MIDI_GET_STATUS_FROM_DATA(midiEvent->data); | const uint8_t status = MIDI_GET_STATUS_FROM_DATA(midiEvent->data); | ||||
const uint8_t channel = MIDI_GET_CHANNEL_FROM_DATA(midiEvent->data); | const uint8_t channel = MIDI_GET_CHANNEL_FROM_DATA(midiEvent->data); | ||||
@@ -774,12 +774,12 @@ private: | |||||
ZynAddSubFxThread fThread; | ZynAddSubFxThread fThread; | ||||
public: | public: | ||||
static PluginHandle _instantiate(const HostDescriptor* host) | |||||
static NativePluginHandle _instantiate(const NativeHostDescriptor* host) | |||||
{ | { | ||||
sInstanceCount.addOne(host); | sInstanceCount.addOne(host); | ||||
return new ZynAddSubFxPlugin(host); | return new ZynAddSubFxPlugin(host); | ||||
} | } | ||||
static void _cleanup(PluginHandle handle) | |||||
static void _cleanup(NativePluginHandle handle) | |||||
{ | { | ||||
delete (ZynAddSubFxPlugin*)handle; | delete (ZynAddSubFxPlugin*)handle; | ||||
sInstanceCount.removeOne(); | sInstanceCount.removeOne(); | ||||
@@ -790,14 +790,14 @@ public: | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static const PluginDescriptor zynaddsubfxDesc = { | |||||
static const NativePluginDescriptor zynaddsubfxDesc = { | |||||
/* category */ PLUGIN_CATEGORY_SYNTH, | /* category */ PLUGIN_CATEGORY_SYNTH, | ||||
#ifdef WANT_ZYNADDSUBFX_UI | #ifdef WANT_ZYNADDSUBFX_UI | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_HAS_GUI|PLUGIN_USES_STATE), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_HAS_UI|PLUGIN_USES_STATE), | |||||
#else | #else | ||||
/* hints */ static_cast<PluginHints>(PLUGIN_USES_STATE), | |||||
/* hints */ static_cast<NativePluginHints>(PLUGIN_USES_STATE), | |||||
#endif | #endif | ||||
/* supports */ static_cast<PluginSupports>(PLUGIN_SUPPORTS_CONTROL_CHANGES|PLUGIN_SUPPORTS_NOTE_AFTERTOUCH|PLUGIN_SUPPORTS_PITCHBEND|PLUGIN_SUPPORTS_ALL_SOUND_OFF), | |||||
/* supports */ static_cast<NativePluginSupports>(PLUGIN_SUPPORTS_CONTROL_CHANGES|PLUGIN_SUPPORTS_NOTE_AFTERTOUCH|PLUGIN_SUPPORTS_PITCHBEND|PLUGIN_SUPPORTS_ALL_SOUND_OFF), | |||||
/* audioIns */ 0, | /* audioIns */ 0, | ||||
/* audioOuts */ 2, | /* audioOuts */ 2, | ||||
/* midiIns */ 1, | /* midiIns */ 1, | ||||