Browse Source

Update code for NATIVE_ prefix

tags/1.9.6
falkTX 10 years ago
parent
commit
23c8c65ff3
24 changed files with 305 additions and 272 deletions
  1. +5
    -5
      source/backend/CarlaHostCommon.cpp
  2. +47
    -27
      source/backend/engine/CarlaEngineNative.cpp
  3. +46
    -46
      source/backend/plugin/NativePlugin.cpp
  4. +13
    -13
      source/modules/CarlaNative.hpp
  5. +3
    -3
      source/modules/native-plugins/audio-file.cpp
  6. +9
    -7
      source/modules/native-plugins/bigmeter.cpp
  7. +2
    -2
      source/modules/native-plugins/bypass.c
  8. +5
    -5
      source/modules/native-plugins/lfo.c
  9. +4
    -2
      source/modules/native-plugins/midi-file.cpp
  10. +7
    -7
      source/modules/native-plugins/midi-gain.c
  11. +2
    -2
      source/modules/native-plugins/midi-sequencer.cpp
  12. +3
    -3
      source/modules/native-plugins/midi-split.c
  13. +3
    -3
      source/modules/native-plugins/midi-through.c
  14. +4
    -4
      source/modules/native-plugins/midi-transpose.c
  15. +3
    -3
      source/modules/native-plugins/nekofilter.c
  16. +7
    -7
      source/modules/native-plugins/nekofilter/nekofilter.c
  17. +5
    -3
      source/modules/native-plugins/notes.cpp
  18. +77
    -77
      source/modules/native-plugins/zynaddsubfx-fx.cpp
  19. +9
    -5
      source/modules/native-plugins/zynaddsubfx-synth.cpp
  20. +1
    -1
      source/plugin/carla-base.cpp
  21. +24
    -24
      source/plugin/carla-lv2-export.cpp
  22. +20
    -20
      source/plugin/carla-lv2.cpp
  23. +2
    -2
      source/plugin/carla-vst.cpp
  24. +4
    -1
      source/tests/ansi-pedantic-test.c

+ 5
- 5
source/backend/CarlaHostCommon.cpp View File

@@ -330,15 +330,15 @@ const CarlaCachedPluginInfo* carla_get_cached_plugin_info(PluginType ptype, uint
info.category = static_cast<CB::PluginCategory>(desc->category);
info.hints = 0x0;

if (desc->hints & ::PLUGIN_IS_RTSAFE)
if (desc->hints & NATIVE_PLUGIN_IS_RTSAFE)
info.hints |= CB::PLUGIN_IS_RTSAFE;
if (desc->hints & ::PLUGIN_IS_SYNTH)
if (desc->hints & NATIVE_PLUGIN_IS_SYNTH)
info.hints |= CB::PLUGIN_IS_SYNTH;
if (desc->hints & ::PLUGIN_HAS_UI)
if (desc->hints & NATIVE_PLUGIN_HAS_UI)
info.hints |= CB::PLUGIN_HAS_CUSTOM_UI;
if (desc->hints & ::PLUGIN_NEEDS_FIXED_BUFFERS)
if (desc->hints & NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS)
info.hints |= CB::PLUGIN_NEEDS_FIXED_BUFFERS;
if (desc->hints & ::PLUGIN_NEEDS_SINGLE_THREAD)
if (desc->hints & NATIVE_PLUGIN_NEEDS_SINGLE_THREAD)
info.hints |= CB::PLUGIN_NEEDS_SINGLE_THREAD;

info.audioIns = desc->audioIns;


+ 47
- 27
source/backend/engine/CarlaEngineNative.cpp View File

@@ -1102,26 +1102,26 @@ protected:
uint hints = 0x0;

if (paramData.hints & PARAMETER_IS_BOOLEAN)
hints |= ::PARAMETER_IS_BOOLEAN;
hints |= NATIVE_PARAMETER_IS_BOOLEAN;
if (paramData.hints & PARAMETER_IS_INTEGER)
hints |= ::PARAMETER_IS_INTEGER;
hints |= NATIVE_PARAMETER_IS_INTEGER;
if (paramData.hints & PARAMETER_IS_LOGARITHMIC)
hints |= ::PARAMETER_IS_LOGARITHMIC;
hints |= NATIVE_PARAMETER_IS_LOGARITHMIC;
if (paramData.hints & PARAMETER_IS_AUTOMABLE)
hints |= ::PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
if (paramData.hints & PARAMETER_USES_SAMPLERATE)
hints |= ::PARAMETER_USES_SAMPLE_RATE;
hints |= NATIVE_PARAMETER_USES_SAMPLE_RATE;
if (paramData.hints & PARAMETER_USES_SCALEPOINTS)
hints |= ::PARAMETER_USES_SCALEPOINTS;
hints |= NATIVE_PARAMETER_USES_SCALEPOINTS;
if (paramData.hints & PARAMETER_USES_CUSTOM_TEXT)
hints |= ::PARAMETER_USES_CUSTOM_TEXT;
hints |= NATIVE_PARAMETER_USES_CUSTOM_TEXT;

if (paramData.type == PARAMETER_INPUT || paramData.type == PARAMETER_OUTPUT)
{
if (paramData.hints & PARAMETER_IS_ENABLED)
hints |= ::PARAMETER_IS_ENABLED;
hints |= NATIVE_PARAMETER_IS_ENABLED;
if (paramData.type == PARAMETER_OUTPUT)
hints |= ::PARAMETER_IS_OUTPUT;
hints |= NATIVE_PARAMETER_IS_OUTPUT;
}

param.hints = static_cast<NativeParameterHints>(hints);
@@ -1503,7 +1503,7 @@ protected:
case CarlaExternalUI::UiShow:
break;
case CarlaExternalUI::UiCrashed:
pHost->dispatcher(pHost->handle, HOST_OPCODE_UI_UNAVAILABLE, 0, 0, nullptr, 0.0f);
pHost->dispatcher(pHost->handle, NATIVE_HOST_OPCODE_UI_UNAVAILABLE, 0, 0, nullptr, 0.0f);
break;
case CarlaExternalUI::UiHide:
pHost->ui_closed(pHost->handle);
@@ -1639,20 +1639,20 @@ public:
{
switch(opcode)
{
case PLUGIN_OPCODE_NULL:
case NATIVE_PLUGIN_OPCODE_NULL:
return 0;
case PLUGIN_OPCODE_BUFFER_SIZE_CHANGED:
case NATIVE_PLUGIN_OPCODE_BUFFER_SIZE_CHANGED:
CARLA_SAFE_ASSERT_RETURN(value > 0, 0);
handlePtr->bufferSizeChanged(static_cast<uint32_t>(value));
return 0;
case PLUGIN_OPCODE_SAMPLE_RATE_CHANGED:
case NATIVE_PLUGIN_OPCODE_SAMPLE_RATE_CHANGED:
CARLA_SAFE_ASSERT_RETURN(opt > 0.0, 0);
handlePtr->sampleRateChanged(static_cast<double>(opt));
return 0;
case PLUGIN_OPCODE_OFFLINE_CHANGED:
case NATIVE_PLUGIN_OPCODE_OFFLINE_CHANGED:
handlePtr->offlineModeChanged(value != 0);
return 0;
case PLUGIN_OPCODE_UI_NAME_CHANGED:
case NATIVE_PLUGIN_OPCODE_UI_NAME_CHANGED:
//handlePtr->uiNameChanged(static_cast<const char*>(ptr));
return 0;
}
@@ -1704,9 +1704,14 @@ private:
// -----------------------------------------------------------------------

static const NativePluginDescriptor carlaRackDesc = {
/* category */ ::PLUGIN_CATEGORY_OTHER,
/* hints */ static_cast<NativePluginHints>(::PLUGIN_IS_SYNTH|::PLUGIN_HAS_UI|::PLUGIN_NEEDS_FIXED_BUFFERS|::PLUGIN_NEEDS_SINGLE_THREAD|::PLUGIN_USES_STATE|::PLUGIN_USES_TIME),
/* supports */ static_cast<NativePluginSupports>(::PLUGIN_SUPPORTS_EVERYTHING),
/* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
/* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
|NATIVE_PLUGIN_HAS_UI
|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
|NATIVE_PLUGIN_NEEDS_SINGLE_THREAD
|NATIVE_PLUGIN_USES_STATE
|NATIVE_PLUGIN_USES_TIME),
/* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
/* audioIns */ 2,
/* audioOuts */ 2,
/* midiIns */ 1,
@@ -1742,9 +1747,14 @@ static const NativePluginDescriptor carlaRackDesc = {
};

static const NativePluginDescriptor carlaPatchbayDesc = {
/* category */ ::PLUGIN_CATEGORY_OTHER,
/* hints */ static_cast<NativePluginHints>(::PLUGIN_IS_SYNTH|::PLUGIN_HAS_UI|::PLUGIN_NEEDS_FIXED_BUFFERS|::PLUGIN_NEEDS_SINGLE_THREAD|::PLUGIN_USES_STATE|::PLUGIN_USES_TIME),
/* supports */ static_cast<NativePluginSupports>(::PLUGIN_SUPPORTS_EVERYTHING),
/* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
/* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
|NATIVE_PLUGIN_HAS_UI
|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
|NATIVE_PLUGIN_NEEDS_SINGLE_THREAD
|NATIVE_PLUGIN_USES_STATE
|NATIVE_PLUGIN_USES_TIME),
/* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
/* audioIns */ 2,
/* audioOuts */ 2,
/* midiIns */ 1,
@@ -1780,9 +1790,14 @@ static const NativePluginDescriptor carlaPatchbayDesc = {
};

static const NativePluginDescriptor carlaPatchbay16Desc = {
/* category */ ::PLUGIN_CATEGORY_OTHER,
/* hints */ static_cast<NativePluginHints>(::PLUGIN_IS_SYNTH|::PLUGIN_HAS_UI|::PLUGIN_NEEDS_FIXED_BUFFERS|::PLUGIN_NEEDS_SINGLE_THREAD|::PLUGIN_USES_STATE|::PLUGIN_USES_TIME),
/* supports */ static_cast<NativePluginSupports>(::PLUGIN_SUPPORTS_EVERYTHING),
/* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
/* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
|NATIVE_PLUGIN_HAS_UI
|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
|NATIVE_PLUGIN_NEEDS_SINGLE_THREAD
|NATIVE_PLUGIN_USES_STATE
|NATIVE_PLUGIN_USES_TIME),
/* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
/* audioIns */ 16,
/* audioOuts */ 16,
/* midiIns */ 1,
@@ -1818,9 +1833,14 @@ static const NativePluginDescriptor carlaPatchbay16Desc = {
};

static const NativePluginDescriptor carlaPatchbay32Desc = {
/* category */ ::PLUGIN_CATEGORY_OTHER,
/* hints */ static_cast<NativePluginHints>(::PLUGIN_IS_SYNTH|::PLUGIN_HAS_UI|::PLUGIN_NEEDS_FIXED_BUFFERS|::PLUGIN_NEEDS_SINGLE_THREAD|::PLUGIN_USES_STATE|::PLUGIN_USES_TIME),
/* supports */ static_cast<NativePluginSupports>(::PLUGIN_SUPPORTS_EVERYTHING),
/* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
/* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
|NATIVE_PLUGIN_HAS_UI
|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
|NATIVE_PLUGIN_NEEDS_SINGLE_THREAD
|NATIVE_PLUGIN_USES_STATE
|NATIVE_PLUGIN_USES_TIME),
/* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
/* audioIns */ 32,
/* audioOuts */ 32,
/* midiIns */ 1,


+ 46
- 46
source/backend/plugin/NativePlugin.cpp View File

@@ -292,10 +292,10 @@ public:

uint options = 0x0;

if (hasMidiProgs && (fDescriptor->supports & ::PLUGIN_SUPPORTS_PROGRAM_CHANGES) == 0)
if (hasMidiProgs && (fDescriptor->supports & NATIVE_PLUGIN_SUPPORTS_PROGRAM_CHANGES) == 0)
options |= PLUGIN_OPTION_MAP_PROGRAM_CHANGES;

if (getMidiInCount() == 0 && (fDescriptor->hints & ::PLUGIN_NEEDS_FIXED_BUFFERS) == 0)
if (getMidiInCount() == 0 && (fDescriptor->hints & NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS) == 0)
options |= PLUGIN_OPTION_FIXED_BUFFERS;

if (pData->engine->getProccessMode() != ENGINE_PROCESS_MODE_CONTINUOUS_RACK)
@@ -306,15 +306,15 @@ public:
options |= PLUGIN_OPTION_FORCE_STEREO;
}

if (fDescriptor->supports & ::PLUGIN_SUPPORTS_CONTROL_CHANGES)
if (fDescriptor->supports & NATIVE_PLUGIN_SUPPORTS_CONTROL_CHANGES)
options |= PLUGIN_OPTION_SEND_CONTROL_CHANGES;
if (fDescriptor->supports & ::PLUGIN_SUPPORTS_CHANNEL_PRESSURE)
if (fDescriptor->supports & NATIVE_PLUGIN_SUPPORTS_CHANNEL_PRESSURE)
options |= PLUGIN_OPTION_SEND_CHANNEL_PRESSURE;
if (fDescriptor->supports & ::PLUGIN_SUPPORTS_NOTE_AFTERTOUCH)
if (fDescriptor->supports & NATIVE_PLUGIN_SUPPORTS_NOTE_AFTERTOUCH)
options |= PLUGIN_OPTION_SEND_NOTE_AFTERTOUCH;
if (fDescriptor->supports & ::PLUGIN_SUPPORTS_PITCHBEND)
if (fDescriptor->supports & NATIVE_PLUGIN_SUPPORTS_PITCHBEND)
options |= PLUGIN_OPTION_SEND_PITCHBEND;
if (fDescriptor->supports & ::PLUGIN_SUPPORTS_ALL_SOUND_OFF)
if (fDescriptor->supports & NATIVE_PLUGIN_SUPPORTS_ALL_SOUND_OFF)
options |= PLUGIN_OPTION_SEND_ALL_SOUND_OFF;

return options;
@@ -505,7 +505,7 @@ public:
CARLA_SAFE_ASSERT_RETURN(fDescriptor != nullptr,);
CARLA_SAFE_ASSERT_RETURN(fHandle != nullptr,);

if (pData->midiprog.count > 0 && fDescriptor->category == ::PLUGIN_CATEGORY_SYNTH)
if (pData->midiprog.count > 0 && fDescriptor->category == NATIVE_PLUGIN_CATEGORY_SYNTH)
{
char strBuf[STR_MAX+1];
std::snprintf(strBuf, STR_MAX, "%i:%i:%i:%i:%i:%i:%i:%i:%i:%i:%i:%i:%i:%i:%i:%i",
@@ -518,7 +518,7 @@ public:
CarlaPlugin::setCustomData(CUSTOM_DATA_TYPE_STRING, "midiPrograms", strBuf, false);
}

if (fDescriptor == nullptr || fDescriptor->get_state == nullptr || (fDescriptor->hints & ::PLUGIN_USES_STATE) == 0)
if (fDescriptor == nullptr || fDescriptor->get_state == nullptr || (fDescriptor->hints & NATIVE_PLUGIN_USES_STATE) == 0)
return;

if (char* data = fDescriptor->get_state(fHandle))
@@ -546,7 +546,7 @@ public:
fHost.uiName = carla_strdup(uiName);

if (fDescriptor->dispatcher != nullptr)
fDescriptor->dispatcher(fHandle, PLUGIN_OPCODE_UI_NAME_CHANGED, 0, 0, uiName, 0.0f);
fDescriptor->dispatcher(fHandle, NATIVE_PLUGIN_OPCODE_UI_NAME_CHANGED, 0, 0, uiName, 0.0f);

CarlaPlugin::setName(newName);
}
@@ -594,7 +594,7 @@ public:

if (std::strcmp(type, CUSTOM_DATA_TYPE_CHUNK) == 0)
{
if (fDescriptor->set_state != nullptr && (fDescriptor->hints & ::PLUGIN_USES_STATE) != 0)
if (fDescriptor->set_state != nullptr && (fDescriptor->hints & NATIVE_PLUGIN_USES_STATE) != 0)
{
const ScopedSingleProcessLocker spl(this, true);

@@ -716,7 +716,7 @@ public:
}

#ifndef BUILD_BRIDGE
if ((fDescriptor->hints & ::PLUGIN_USES_PARENT_ID) == 0 && std::strstr(fDescriptor->label, "file") == nullptr)
if ((fDescriptor->hints & NATIVE_PLUGIN_USES_PARENT_ID) == 0 && std::strstr(fDescriptor->label, "file") == nullptr)
pData->tryTransient();
#endif

@@ -1002,7 +1002,7 @@ public:
else if (def > max)
def = max;

if (paramInfo->hints & ::PARAMETER_USES_SAMPLE_RATE)
if (paramInfo->hints & NATIVE_PARAMETER_USES_SAMPLE_RATE)
{
min *= sampleRate;
max *= sampleRate;
@@ -1010,14 +1010,14 @@ public:
pData->param.data[j].hints |= PARAMETER_USES_SAMPLERATE;
}

if (paramInfo->hints & ::PARAMETER_IS_BOOLEAN)
if (paramInfo->hints & NATIVE_PARAMETER_IS_BOOLEAN)
{
step = max - min;
stepSmall = step;
stepLarge = step;
pData->param.data[j].hints |= PARAMETER_IS_BOOLEAN;
}
else if (paramInfo->hints & ::PARAMETER_IS_INTEGER)
else if (paramInfo->hints & NATIVE_PARAMETER_IS_INTEGER)
{
step = 1.0f;
stepSmall = 1.0f;
@@ -1032,7 +1032,7 @@ public:
stepLarge = range/10.0f;
}

if (paramInfo->hints & ::PARAMETER_IS_OUTPUT)
if (paramInfo->hints & NATIVE_PARAMETER_IS_OUTPUT)
{
pData->param.data[j].type = PARAMETER_OUTPUT;
needsCtrlOut = true;
@@ -1044,19 +1044,19 @@ public:
}

// extra parameter hints
if (paramInfo->hints & ::PARAMETER_IS_ENABLED)
if (paramInfo->hints & NATIVE_PARAMETER_IS_ENABLED)
pData->param.data[j].hints |= PARAMETER_IS_ENABLED;

if (paramInfo->hints & ::PARAMETER_IS_AUTOMABLE)
if (paramInfo->hints & NATIVE_PARAMETER_IS_AUTOMABLE)
pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE;

if (paramInfo->hints & ::PARAMETER_IS_LOGARITHMIC)
if (paramInfo->hints & NATIVE_PARAMETER_IS_LOGARITHMIC)
pData->param.data[j].hints |= PARAMETER_IS_LOGARITHMIC;

if (paramInfo->hints & ::PARAMETER_USES_SCALEPOINTS)
if (paramInfo->hints & NATIVE_PARAMETER_USES_SCALEPOINTS)
pData->param.data[j].hints |= PARAMETER_USES_SCALEPOINTS;

if (paramInfo->hints & ::PARAMETER_USES_CUSTOM_TEXT)
if (paramInfo->hints & NATIVE_PARAMETER_USES_CUSTOM_TEXT)
pData->param.data[j].hints |= PARAMETER_USES_CUSTOM_TEXT;

pData->param.ranges[j].min = min;
@@ -1117,15 +1117,15 @@ public:
pData->hints |= PLUGIN_CAN_BALANCE;

// native plugin hints
if (fDescriptor->hints & ::PLUGIN_IS_RTSAFE)
if (fDescriptor->hints & NATIVE_PLUGIN_IS_RTSAFE)
pData->hints |= PLUGIN_IS_RTSAFE;
if (fDescriptor->hints & ::PLUGIN_IS_SYNTH)
if (fDescriptor->hints & NATIVE_PLUGIN_IS_SYNTH)
pData->hints |= PLUGIN_IS_SYNTH;
if (fDescriptor->hints & ::PLUGIN_HAS_UI)
if (fDescriptor->hints & NATIVE_PLUGIN_HAS_UI)
pData->hints |= PLUGIN_HAS_CUSTOM_UI;
if (fDescriptor->hints & ::PLUGIN_NEEDS_SINGLE_THREAD)
if (fDescriptor->hints & NATIVE_PLUGIN_NEEDS_SINGLE_THREAD)
pData->hints |= PLUGIN_NEEDS_SINGLE_THREAD;
if (fDescriptor->hints & ::PLUGIN_NEEDS_FIXED_BUFFERS)
if (fDescriptor->hints & NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS)
pData->hints |= PLUGIN_NEEDS_FIXED_BUFFERS;

// extra plugin hints
@@ -1134,7 +1134,7 @@ public:
if (aIns <= 2 && aOuts <= 2 && (aIns == aOuts || aIns == 0 || aOuts == 0) && mIns <= 1 && mOuts <= 1)
pData->extraHints |= PLUGIN_EXTRA_HINT_CAN_RUN_RACK;

if (fDescriptor->hints & ::PLUGIN_USES_MULTI_PROGS)
if (fDescriptor->hints & NATIVE_PLUGIN_USES_MULTI_PROGS)
pData->extraHints |= PLUGIN_EXTRA_HINT_USES_MULTI_PROGS;

bufferSizeChanged(pData->engine->getBufferSize());
@@ -1923,10 +1923,10 @@ public:

if (fDescriptor != nullptr && fDescriptor->dispatcher != nullptr)
{
fDescriptor->dispatcher(fHandle, PLUGIN_OPCODE_BUFFER_SIZE_CHANGED, 0, static_cast<intptr_t>(newBufferSize), nullptr, 0.0f);
fDescriptor->dispatcher(fHandle, NATIVE_PLUGIN_OPCODE_BUFFER_SIZE_CHANGED, 0, static_cast<intptr_t>(newBufferSize), nullptr, 0.0f);

if (fHandle2 != nullptr)
fDescriptor->dispatcher(fHandle2, PLUGIN_OPCODE_BUFFER_SIZE_CHANGED, 0, static_cast<intptr_t>(newBufferSize), nullptr, 0.0f);
fDescriptor->dispatcher(fHandle2, NATIVE_PLUGIN_OPCODE_BUFFER_SIZE_CHANGED, 0, static_cast<intptr_t>(newBufferSize), nullptr, 0.0f);
}
}

@@ -1937,10 +1937,10 @@ public:

if (fDescriptor != nullptr && fDescriptor->dispatcher != nullptr)
{
fDescriptor->dispatcher(fHandle, PLUGIN_OPCODE_SAMPLE_RATE_CHANGED, 0, 0, nullptr, float(newSampleRate));
fDescriptor->dispatcher(fHandle, NATIVE_PLUGIN_OPCODE_SAMPLE_RATE_CHANGED, 0, 0, nullptr, float(newSampleRate));

if (fHandle2 != nullptr)
fDescriptor->dispatcher(fHandle2, PLUGIN_OPCODE_SAMPLE_RATE_CHANGED, 0, 0, nullptr, float(newSampleRate));
fDescriptor->dispatcher(fHandle2, NATIVE_PLUGIN_OPCODE_SAMPLE_RATE_CHANGED, 0, 0, nullptr, float(newSampleRate));
}
}

@@ -1948,10 +1948,10 @@ public:
{
if (fDescriptor != nullptr && fDescriptor->dispatcher != nullptr)
{
fDescriptor->dispatcher(fHandle, PLUGIN_OPCODE_OFFLINE_CHANGED, 0, isOffline ? 1 : 0, nullptr, 0.0f);
fDescriptor->dispatcher(fHandle, NATIVE_PLUGIN_OPCODE_OFFLINE_CHANGED, 0, isOffline ? 1 : 0, nullptr, 0.0f);

if (fHandle2 != nullptr)
fDescriptor->dispatcher(fHandle2, PLUGIN_OPCODE_OFFLINE_CHANGED, 0, isOffline ? 1 : 0, nullptr, 0.0f);
fDescriptor->dispatcher(fHandle2, NATIVE_PLUGIN_OPCODE_OFFLINE_CHANGED, 0, isOffline ? 1 : 0, nullptr, 0.0f);
}
}

@@ -2162,29 +2162,29 @@ protected:

switch (opcode)
{
case ::HOST_OPCODE_NULL:
case NATIVE_HOST_OPCODE_NULL:
break;
case ::HOST_OPCODE_UPDATE_PARAMETER:
case NATIVE_HOST_OPCODE_UPDATE_PARAMETER:
// TODO
pData->engine->callback(ENGINE_CALLBACK_UPDATE, pData->id, -1, 0, 0.0f, nullptr);
break;
case ::HOST_OPCODE_UPDATE_MIDI_PROGRAM:
case NATIVE_HOST_OPCODE_UPDATE_MIDI_PROGRAM:
// TODO
pData->engine->callback(ENGINE_CALLBACK_UPDATE, pData->id, -1, 0, 0.0f, nullptr);
break;
case ::HOST_OPCODE_RELOAD_PARAMETERS:
case NATIVE_HOST_OPCODE_RELOAD_PARAMETERS:
reload(); // FIXME
pData->engine->callback(ENGINE_CALLBACK_RELOAD_PARAMETERS, pData->id, -1, 0, 0.0f, nullptr);
break;
case ::HOST_OPCODE_RELOAD_MIDI_PROGRAMS:
case NATIVE_HOST_OPCODE_RELOAD_MIDI_PROGRAMS:
reloadPrograms(false);
pData->engine->callback(ENGINE_CALLBACK_RELOAD_PROGRAMS, pData->id, -1, 0, 0.0f, nullptr);
break;
case ::HOST_OPCODE_RELOAD_ALL:
case NATIVE_HOST_OPCODE_RELOAD_ALL:
reload();
pData->engine->callback(ENGINE_CALLBACK_RELOAD_ALL, pData->id, -1, 0, 0.0f, nullptr);
break;
case ::HOST_OPCODE_UI_UNAVAILABLE:
case NATIVE_HOST_OPCODE_UI_UNAVAILABLE:
pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, pData->id, -1, 0, 0.0f, nullptr);
break;
}
@@ -2326,22 +2326,22 @@ public:

pData->options = 0x0;

if (hasMidiProgs && (fDescriptor->supports & ::PLUGIN_SUPPORTS_PROGRAM_CHANGES) == 0)
if (hasMidiProgs && (fDescriptor->supports & NATIVE_PLUGIN_SUPPORTS_PROGRAM_CHANGES) == 0)
pData->options |= PLUGIN_OPTION_MAP_PROGRAM_CHANGES;

if (getMidiInCount() > 0 || (fDescriptor->hints & ::PLUGIN_NEEDS_FIXED_BUFFERS) != 0)
if (getMidiInCount() > 0 || (fDescriptor->hints & NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS) != 0)
pData->options |= PLUGIN_OPTION_FIXED_BUFFERS;

if (pData->engine->getOptions().forceStereo)
pData->options |= PLUGIN_OPTION_FORCE_STEREO;

if (fDescriptor->supports & ::PLUGIN_SUPPORTS_CHANNEL_PRESSURE)
if (fDescriptor->supports & NATIVE_PLUGIN_SUPPORTS_CHANNEL_PRESSURE)
pData->options |= PLUGIN_OPTION_SEND_CHANNEL_PRESSURE;
if (fDescriptor->supports & ::PLUGIN_SUPPORTS_NOTE_AFTERTOUCH)
if (fDescriptor->supports & NATIVE_PLUGIN_SUPPORTS_NOTE_AFTERTOUCH)
pData->options |= PLUGIN_OPTION_SEND_NOTE_AFTERTOUCH;
if (fDescriptor->supports & ::PLUGIN_SUPPORTS_PITCHBEND)
if (fDescriptor->supports & NATIVE_PLUGIN_SUPPORTS_PITCHBEND)
pData->options |= PLUGIN_OPTION_SEND_PITCHBEND;
if (fDescriptor->supports & ::PLUGIN_SUPPORTS_ALL_SOUND_OFF)
if (fDescriptor->supports & NATIVE_PLUGIN_SUPPORTS_ALL_SOUND_OFF)
pData->options |= PLUGIN_OPTION_SEND_ALL_SOUND_OFF;

return true;


+ 13
- 13
source/modules/CarlaNative.hpp View File

@@ -157,56 +157,56 @@ protected:
{
CARLA_SAFE_ASSERT_RETURN(pHost != nullptr,);

pHost->dispatcher(pHost->handle, HOST_OPCODE_UPDATE_PARAMETER, index, 0, nullptr, 0.0f);
pHost->dispatcher(pHost->handle, NATIVE_HOST_OPCODE_UPDATE_PARAMETER, index, 0, nullptr, 0.0f);
}

void hostUpdateAllParameters() const
{
CARLA_SAFE_ASSERT_RETURN(pHost != nullptr,);

pHost->dispatcher(pHost->handle, HOST_OPCODE_UPDATE_PARAMETER, -1, 0, nullptr, 0.0f);
pHost->dispatcher(pHost->handle, NATIVE_HOST_OPCODE_UPDATE_PARAMETER, -1, 0, nullptr, 0.0f);
}

void hostUpdateMidiProgram(const int32_t index, const intptr_t channel = 0) const
{
CARLA_SAFE_ASSERT_RETURN(pHost != nullptr,);

pHost->dispatcher(pHost->handle, HOST_OPCODE_UPDATE_MIDI_PROGRAM, index, channel, nullptr, 0.0f);
pHost->dispatcher(pHost->handle, NATIVE_HOST_OPCODE_UPDATE_MIDI_PROGRAM, index, channel, nullptr, 0.0f);
}

void hostUpdateAllMidiPrograms(const intptr_t channel = 0) const
{
CARLA_SAFE_ASSERT_RETURN(pHost != nullptr,);

pHost->dispatcher(pHost->handle, HOST_OPCODE_UPDATE_MIDI_PROGRAM, -1, channel, nullptr, 0.0f);
pHost->dispatcher(pHost->handle, NATIVE_HOST_OPCODE_UPDATE_MIDI_PROGRAM, -1, channel, nullptr, 0.0f);
}

void hostReloadParameters() const
{
CARLA_SAFE_ASSERT_RETURN(pHost != nullptr,);

pHost->dispatcher(pHost->handle, HOST_OPCODE_RELOAD_PARAMETERS, 0, 0, nullptr, 0.0f);
pHost->dispatcher(pHost->handle, NATIVE_HOST_OPCODE_RELOAD_PARAMETERS, 0, 0, nullptr, 0.0f);
}

void hostReloadMidiPrograms() const
{
CARLA_SAFE_ASSERT_RETURN(pHost != nullptr,);

pHost->dispatcher(pHost->handle, HOST_OPCODE_RELOAD_MIDI_PROGRAMS, 0, 0, nullptr, 0.0f);
pHost->dispatcher(pHost->handle, NATIVE_HOST_OPCODE_RELOAD_MIDI_PROGRAMS, 0, 0, nullptr, 0.0f);
}

void hostReloadAll() const
{
CARLA_SAFE_ASSERT_RETURN(pHost != nullptr,);

pHost->dispatcher(pHost->handle, HOST_OPCODE_RELOAD_ALL, 0, 0, nullptr, 0.0f);
pHost->dispatcher(pHost->handle, NATIVE_HOST_OPCODE_RELOAD_ALL, 0, 0, nullptr, 0.0f);
}

void hostUiUnavailable() const
{
CARLA_SAFE_ASSERT_RETURN(pHost != nullptr,);

pHost->dispatcher(pHost->handle, HOST_OPCODE_UI_UNAVAILABLE, 0, 0, nullptr, 0.0f);
pHost->dispatcher(pHost->handle, NATIVE_HOST_OPCODE_UI_UNAVAILABLE, 0, 0, nullptr, 0.0f);
}

// -------------------------------------------------------------------
@@ -488,20 +488,20 @@ public:
{
switch(opcode)
{
case PLUGIN_OPCODE_NULL:
case NATIVE_PLUGIN_OPCODE_NULL:
return 0;
case PLUGIN_OPCODE_BUFFER_SIZE_CHANGED:
case NATIVE_PLUGIN_OPCODE_BUFFER_SIZE_CHANGED:
CARLA_SAFE_ASSERT_RETURN(value > 0, 0);
handlePtr->bufferSizeChanged(static_cast<uint32_t>(value));
return 0;
case PLUGIN_OPCODE_SAMPLE_RATE_CHANGED:
case NATIVE_PLUGIN_OPCODE_SAMPLE_RATE_CHANGED:
CARLA_SAFE_ASSERT_RETURN(opt > 0.0f, 0);
handlePtr->sampleRateChanged(static_cast<double>(opt));
return 0;
case PLUGIN_OPCODE_OFFLINE_CHANGED:
case NATIVE_PLUGIN_OPCODE_OFFLINE_CHANGED:
handlePtr->offlineChanged(value != 0);
return 0;
case PLUGIN_OPCODE_UI_NAME_CHANGED:
case NATIVE_PLUGIN_OPCODE_UI_NAME_CHANGED:
CARLA_SAFE_ASSERT_RETURN(ptr != nullptr, 0);
handlePtr->uiNameChanged(static_cast<const char*>(ptr));
return 0;


+ 3
- 3
source/modules/native-plugins/audio-file.cpp View File

@@ -88,7 +88,7 @@ protected:

param.name = "Loop Mode";
param.unit = nullptr;
param.hints = static_cast<NativeParameterHints>(PARAMETER_IS_ENABLED|PARAMETER_IS_BOOLEAN);
param.hints = static_cast<NativeParameterHints>(NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_BOOLEAN);
param.ranges.def = 1.0f;
param.ranges.min = 0.0f;
param.ranges.max = 1.0f;
@@ -292,8 +292,8 @@ private:
// -----------------------------------------------------------------------

static const NativePluginDescriptor audiofileDesc = {
/* category */ PLUGIN_CATEGORY_UTILITY,
/* hints */ static_cast<NativePluginHints>(PLUGIN_HAS_UI|PLUGIN_NEEDS_UI_OPEN_SAVE),
/* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
/* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_HAS_UI|NATIVE_PLUGIN_NEEDS_UI_OPEN_SAVE),
/* supports */ static_cast<NativePluginSupports>(0x0),
/* audioIns */ 0,
/* audioOuts */ 2,


+ 9
- 7
source/modules/native-plugins/bigmeter.cpp View File

@@ -57,7 +57,7 @@ protected:
static NativeParameter param;
static NativeParameterScalePoint scalePoints[2];

int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE;
int hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_AUTOMABLE;

param.name = nullptr;
param.unit = nullptr;
@@ -73,7 +73,7 @@ protected:
switch (index)
{
case 0:
hints |= PARAMETER_IS_INTEGER|PARAMETER_USES_SCALEPOINTS;
hints |= NATIVE_PARAMETER_IS_INTEGER|NATIVE_PARAMETER_USES_SCALEPOINTS;
param.name = "Color";
param.ranges.def = 1.0f;
param.ranges.min = 1.0f;
@@ -86,7 +86,7 @@ protected:
param.scalePoints = scalePoints;
break;
case 1:
hints |= PARAMETER_IS_INTEGER|PARAMETER_USES_SCALEPOINTS;
hints |= NATIVE_PARAMETER_IS_INTEGER|NATIVE_PARAMETER_USES_SCALEPOINTS;
param.name = "Style";
param.ranges.def = 1.0f;
param.ranges.min = 1.0f;
@@ -99,11 +99,11 @@ protected:
param.scalePoints = scalePoints;
break;
case 2:
hints |= PARAMETER_IS_OUTPUT;
hints |= NATIVE_PARAMETER_IS_OUTPUT;
param.name = "Out Left";
break;
case 3:
hints |= PARAMETER_IS_OUTPUT;
hints |= NATIVE_PARAMETER_IS_OUTPUT;
param.name = "Out Right";
break;
}
@@ -179,8 +179,10 @@ private:
// -----------------------------------------------------------------------

static const NativePluginDescriptor bigmeterDesc = {
/* category */ PLUGIN_CATEGORY_UTILITY,
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI|PLUGIN_NEEDS_FIXED_BUFFERS),
/* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
/* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
|NATIVE_PLUGIN_HAS_UI
|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
/* supports */ static_cast<NativePluginSupports>(0x0),
/* audioIns */ 2,
/* audioOuts */ 0,


+ 2
- 2
source/modules/native-plugins/bypass.c View File

@@ -44,8 +44,8 @@ static void bypass_process(NativePluginHandle handle, float** inBuffer, float**
// -----------------------------------------------------------------------

static const NativePluginDescriptor bypassDesc = {
.category = PLUGIN_CATEGORY_NONE,
.hints = PLUGIN_IS_RTSAFE,
.category = NATIVE_PLUGIN_CATEGORY_NONE,
.hints = NATIVE_PLUGIN_IS_RTSAFE,
.supports = 0x0,
.audioIns = 1,
.audioOuts = 1,


+ 5
- 5
source/modules/native-plugins/lfo.c View File

@@ -84,7 +84,7 @@ static const NativeParameter* lfo_get_parameter_info(NativePluginHandle handle,
static NativeParameter param;
static NativeParameterScalePoint paramModes[5];

param.hints = PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE;
param.hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_AUTOMABLE;
param.scalePointCount = 0;
param.scalePoints = NULL;

@@ -105,7 +105,7 @@ static const NativeParameter* lfo_get_parameter_info(NativePluginHandle handle,
case PARAM_MODE:
param.name = "Mode";
param.unit = NULL;
param.hints |= PARAMETER_IS_INTEGER|PARAMETER_USES_SCALEPOINTS;
param.hints |= NATIVE_PARAMETER_IS_INTEGER|NATIVE_PARAMETER_USES_SCALEPOINTS;
param.ranges.def = 1.0f;
param.ranges.min = 1.0f;
param.ranges.max = 5.0f;
@@ -148,7 +148,7 @@ static const NativeParameter* lfo_get_parameter_info(NativePluginHandle handle,
case PARAM_LFO_OUT:
param.name = "LFO Out";
param.unit = NULL;
param.hints |= PARAMETER_IS_OUTPUT;
param.hints |= NATIVE_PARAMETER_IS_OUTPUT;
param.ranges.def = 0.0f;
param.ranges.min = 0.0f;
param.ranges.max = 1.0f;
@@ -265,8 +265,8 @@ static void lfo_process(NativePluginHandle handle, float** inBuffer, float** out
// -----------------------------------------------------------------------

static const NativePluginDescriptor lfoDesc = {
.category = PLUGIN_CATEGORY_UTILITY,
.hints = PLUGIN_IS_RTSAFE,
.category = NATIVE_PLUGIN_CATEGORY_UTILITY,
.hints = NATIVE_PLUGIN_IS_RTSAFE,
.supports = 0x0,
.audioIns = 0,
.audioOuts = 0,


+ 4
- 2
source/modules/native-plugins/midi-file.cpp View File

@@ -200,8 +200,10 @@ private:
// -----------------------------------------------------------------------

static const NativePluginDescriptor midifileDesc = {
/* category */ PLUGIN_CATEGORY_UTILITY,
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI|PLUGIN_NEEDS_UI_OPEN_SAVE),
/* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
/* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE
|NATIVE_PLUGIN_HAS_UI
|NATIVE_PLUGIN_NEEDS_UI_OPEN_SAVE),
/* supports */ static_cast<NativePluginSupports>(0x0),
/* audioIns */ 0,
/* audioOuts */ 0,


+ 7
- 7
source/modules/native-plugins/midi-gain.c View File

@@ -78,7 +78,7 @@ static const NativeParameter* midigain_get_parameter_info(NativePluginHandle han

static NativeParameter param;

param.hints = PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE;
param.hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_AUTOMABLE;
param.unit = NULL;
param.scalePointCount = 0;
param.scalePoints = NULL;
@@ -96,7 +96,7 @@ static const NativeParameter* midigain_get_parameter_info(NativePluginHandle han
break;
case PARAM_APPLY_NOTES:
param.name = "Apply Notes";
param.hints |= PARAMETER_IS_BOOLEAN;
param.hints |= NATIVE_PARAMETER_IS_BOOLEAN;
param.ranges.def = 1.0f;
param.ranges.min = 0.0f;
param.ranges.max = 1.0f;
@@ -106,7 +106,7 @@ static const NativeParameter* midigain_get_parameter_info(NativePluginHandle han
break;
case PARAM_APPLY_AFTERTOUCH:
param.name = "Apply Aftertouch";
param.hints |= PARAMETER_IS_BOOLEAN;
param.hints |= NATIVE_PARAMETER_IS_BOOLEAN;
param.ranges.def = 1.0f;
param.ranges.min = 0.0f;
param.ranges.max = 1.0f;
@@ -116,7 +116,7 @@ static const NativeParameter* midigain_get_parameter_info(NativePluginHandle han
break;
case PARAM_APPLY_CC:
param.name = "Apply CC";
param.hints |= PARAMETER_IS_BOOLEAN;
param.hints |= NATIVE_PARAMETER_IS_BOOLEAN;
param.ranges.def = 0.0f;
param.ranges.min = 0.0f;
param.ranges.max = 1.0f;
@@ -215,9 +215,9 @@ static void midigain_process(NativePluginHandle handle, float** inBuffer, float*
// -----------------------------------------------------------------------

static const NativePluginDescriptor midigainDesc = {
.category = PLUGIN_CATEGORY_UTILITY,
.hints = PLUGIN_IS_RTSAFE,
.supports = PLUGIN_SUPPORTS_EVERYTHING,
.category = NATIVE_PLUGIN_CATEGORY_UTILITY,
.hints = NATIVE_PLUGIN_IS_RTSAFE,
.supports = NATIVE_PLUGIN_SUPPORTS_EVERYTHING,
.audioIns = 0,
.audioOuts = 0,
.midiIns = 1,


+ 2
- 2
source/modules/native-plugins/midi-sequencer.cpp View File

@@ -233,8 +233,8 @@ private:
// -----------------------------------------------------------------------

static const NativePluginDescriptor midisequencerDesc = {
/* category */ PLUGIN_CATEGORY_UTILITY,
/* hints */ PLUGIN_IS_RTSAFE/*|PLUGIN_HAS_GUI*/,
/* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
/* hints */ NATIVE_PLUGIN_IS_RTSAFE/*|NATIVE_PLUGIN_HAS_GUI*/,
/* supports */ static_cast<NativePluginSupports>(0x0),
/* audioIns */ 0,
/* audioOuts */ 0,


+ 3
- 3
source/modules/native-plugins/midi-split.c View File

@@ -85,9 +85,9 @@ static void midisplit_process(NativePluginHandle handle, float** inBuffer, float
// -----------------------------------------------------------------------

static const NativePluginDescriptor midisplitDesc = {
.category = PLUGIN_CATEGORY_UTILITY,
.hints = PLUGIN_IS_RTSAFE,
.supports = PLUGIN_SUPPORTS_EVERYTHING,
.category = NATIVE_PLUGIN_CATEGORY_UTILITY,
.hints = NATIVE_PLUGIN_IS_RTSAFE,
.supports = NATIVE_PLUGIN_SUPPORTS_EVERYTHING,
.audioIns = 0,
.audioOuts = 0,
.midiIns = 1,


+ 3
- 3
source/modules/native-plugins/midi-through.c View File

@@ -66,9 +66,9 @@ static void midithrough_process(NativePluginHandle handle, float** inBuffer, flo
// -----------------------------------------------------------------------

static const NativePluginDescriptor midithroughDesc = {
.category = PLUGIN_CATEGORY_UTILITY,
.hints = PLUGIN_IS_RTSAFE,
.supports = PLUGIN_SUPPORTS_EVERYTHING,
.category = NATIVE_PLUGIN_CATEGORY_UTILITY,
.hints = NATIVE_PLUGIN_IS_RTSAFE,
.supports = NATIVE_PLUGIN_SUPPORTS_EVERYTHING,
.audioIns = 0,
.audioOuts = 0,
.midiIns = 1,


+ 4
- 4
source/modules/native-plugins/midi-transpose.c View File

@@ -65,7 +65,7 @@ static const NativeParameter* miditranspose_get_parameter_info(NativePluginHandl

param.name = "Octaves";
param.unit = NULL;
param.hints = PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE|PARAMETER_IS_INTEGER;
param.hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_INTEGER;
param.ranges.def = 0.0f;
param.ranges.min = -8.0f;
param.ranges.max = 8.0f;
@@ -144,9 +144,9 @@ static void miditranspose_process(NativePluginHandle handle, float** inBuffer, f
// -----------------------------------------------------------------------

static const NativePluginDescriptor miditransposeDesc = {
.category = PLUGIN_CATEGORY_UTILITY,
.hints = PLUGIN_IS_RTSAFE,
.supports = PLUGIN_SUPPORTS_EVERYTHING,
.category = NATIVE_PLUGIN_CATEGORY_UTILITY,
.hints = NATIVE_PLUGIN_IS_RTSAFE,
.supports = NATIVE_PLUGIN_SUPPORTS_EVERYTHING,
.audioIns = 0,
.audioOuts = 0,
.midiIns = 1,


+ 3
- 3
source/modules/native-plugins/nekofilter.c View File

@@ -27,11 +27,11 @@
// -----------------------------------------------------------------------

static const NativePluginDescriptor nekofilterDesc = {
.category = PLUGIN_CATEGORY_FILTER,
.category = NATIVE_PLUGIN_CATEGORY_FILTER,
#ifdef WANT_UI
.hints = PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI,
.hints = NATIVE_PLUGIN_IS_RTSAFE|NATIVE_PLUGIN_HAS_UI,
#else
.hints = PLUGIN_IS_RTSAFE,
.hints = NATIVE_PLUGIN_IS_RTSAFE,
#endif
.supports = 0x0,
.audioIns = 1,


+ 7
- 7
source/modules/native-plugins/nekofilter/nekofilter.c View File

@@ -178,7 +178,7 @@ nekofilter_get_parameter_info(
// internal cleanup call
return NULL;

param.hints = PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE;
param.hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_AUTOMABLE;
param.ranges.def = 0.0f;
param.ranges.min = 0.0f;
param.ranges.max = 0.0f;
@@ -189,7 +189,7 @@ nekofilter_get_parameter_info(
{
case GLOBAL_PARAMETER_ACTIVE:
name = strdup("Active");
param.hints |= PARAMETER_IS_BOOLEAN;
param.hints |= NATIVE_PARAMETER_IS_BOOLEAN;
param.ranges.max = 1.0f;
goto ready;
break;
@@ -215,7 +215,7 @@ nekofilter_get_parameter_info(
case BAND_PARAMETER_ACTIVE:
strcat(strBuf, "Active");
name = strdup(strBuf);
param.hints |= PARAMETER_IS_BOOLEAN;
param.hints |= NATIVE_PARAMETER_IS_BOOLEAN;
param.ranges.max = 1.0f;
break;

@@ -223,7 +223,7 @@ nekofilter_get_parameter_info(
strcat(strBuf, "Frequency");
name = strdup(strBuf);
unit = strdup("Hz");
param.hints |= PARAMETER_IS_LOGARITHMIC;
param.hints |= NATIVE_PARAMETER_IS_LOGARITHMIC;

switch (band)
{
@@ -249,7 +249,7 @@ nekofilter_get_parameter_info(
case BAND_PARAMETER_BANDWIDTH:
strcat(strBuf, "Bandwidth");
name = strdup(strBuf);
param.hints |= PARAMETER_IS_LOGARITHMIC;
param.hints |= NATIVE_PARAMETER_IS_LOGARITHMIC;
param.ranges.min = 0.125f;
param.ranges.max = 8.0f;
break;
@@ -264,7 +264,7 @@ nekofilter_get_parameter_info(
}

ready:
if (param.hints & PARAMETER_IS_BOOLEAN)
if (param.hints & NATIVE_PARAMETER_IS_BOOLEAN)
{
param.ranges.step = 1.0f;
param.ranges.stepSmall = 1.0f;
@@ -361,7 +361,7 @@ nekofilter_ui_show(
if (nekofilter_ptr->ui != NULL)
nekoui_show(nekofilter_ptr->ui);
else
nekofilter_ptr->host->dispatcher(nekofilter_ptr->host->handle, HOST_OPCODE_UI_UNAVAILABLE, 0, 0, NULL, 0.0f);
nekofilter_ptr->host->dispatcher(nekofilter_ptr->host->handle, NATIVE_HOST_OPCODE_UI_UNAVAILABLE, 0, 0, NULL, 0.0f);
}
else if (nekofilter_ptr->ui != NULL)
nekoui_hide(nekofilter_ptr->ui);


+ 5
- 3
source/modules/native-plugins/notes.cpp View File

@@ -49,7 +49,9 @@ protected:

static NativeParameter param;

param.hints = static_cast<NativeParameterHints>(PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE|PARAMETER_IS_INTEGER);
param.hints = static_cast<NativeParameterHints>(NATIVE_PARAMETER_IS_ENABLED
|NATIVE_PARAMETER_IS_AUTOMABLE
|NATIVE_PARAMETER_IS_INTEGER);
param.name = "Page";
param.unit = nullptr;
param.ranges.def = 1.0f;
@@ -100,8 +102,8 @@ private:
// -----------------------------------------------------------------------

static const NativePluginDescriptor notesDesc = {
/* category */ PLUGIN_CATEGORY_UTILITY,
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_HAS_UI),
/* category */ NATIVE_PLUGIN_CATEGORY_UTILITY,
/* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE|NATIVE_PLUGIN_HAS_UI),
/* supports */ static_cast<NativePluginSupports>(0x0),
/* audioIns */ 0,
/* audioOuts */ 0,


+ 77
- 77
source/modules/native-plugins/zynaddsubfx-fx.cpp View File

@@ -212,7 +212,7 @@ protected:
static NativeParameter param;
static NativeParameterScalePoint scalePoints[2];

int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_INTEGER;
int hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_INTEGER;

param.name = nullptr;
param.unit = nullptr;
@@ -228,17 +228,17 @@ protected:
switch (index)
{
case 0:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "LFO Frequency";
param.ranges.def = 70.0f;
break;
case 1:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "LFO Randomness";
param.ranges.def = 0.0f;
break;
case 2:
hints |= PARAMETER_IS_AUTOMABLE|PARAMETER_IS_BOOLEAN|PARAMETER_USES_SCALEPOINTS;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN|NATIVE_PARAMETER_USES_SCALEPOINTS;
param.name = "LFO Type";
param.ranges.def = 0.0f;
param.ranges.max = 1.0f;
@@ -250,17 +250,17 @@ protected:
scalePoints[1].value = 1.0f;
break;
case 3:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "LFO Stereo";
param.ranges.def = 62.0f;
break;
case 4:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "Depth";
param.ranges.def = 60.0f;
break;
case 5:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "Feedback";
param.ranges.def = 105.0f;
break;
@@ -271,12 +271,12 @@ protected:
param.ranges.max = 100.0f;
break;
case 7:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "L/R Cross";
param.ranges.def = 0.0f;
break;
case 8:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "Phase";
param.ranges.def = 64.0f;
break;
@@ -358,7 +358,7 @@ protected:
static NativeParameter param;
static NativeParameterScalePoint scalePoints[2];

int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_INTEGER;
int hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_INTEGER;

param.name = nullptr;
param.unit = nullptr;
@@ -374,17 +374,17 @@ protected:
switch (index)
{
case 0:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "LFO Frequency";
param.ranges.def = 50.0f;
break;
case 1:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "LFO Randomness";
param.ranges.def = 0.0f;
break;
case 2:
hints |= PARAMETER_IS_AUTOMABLE|PARAMETER_IS_BOOLEAN|PARAMETER_USES_SCALEPOINTS;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN|NATIVE_PARAMETER_USES_SCALEPOINTS;
param.name = "LFO Type";
param.ranges.def = 0.0f;
param.ranges.max = 1.0f;
@@ -396,38 +396,38 @@ protected:
scalePoints[1].value = 1.0f;
break;
case 3:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "LFO Stereo";
param.ranges.def = 90.0f;
break;
case 4:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "Depth";
param.ranges.def = 40.0f;
break;
case 5:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "Delay";
param.ranges.def = 85.0f;
break;
case 6:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "Feedback";
param.ranges.def = 64.0f;
break;
case 7:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "L/R Cross";
param.ranges.def = 119.0f;
break;
case 8:
hints |= PARAMETER_IS_AUTOMABLE|PARAMETER_IS_BOOLEAN;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN;
param.name = "Flange Mode";
param.ranges.def = 0.0f;
param.ranges.max = 1.0f;
break;
case 9:
hints |= PARAMETER_IS_AUTOMABLE|PARAMETER_IS_BOOLEAN;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN;
param.name = "Subtract Output";
param.ranges.def = 0.0f;
param.ranges.max = 1.0f;
@@ -528,7 +528,7 @@ protected:
static NativeParameter param;
static NativeParameterScalePoint scalePoints[14];

int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_INTEGER;
int hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_INTEGER;

param.name = nullptr;
param.unit = nullptr;
@@ -544,22 +544,22 @@ protected:
switch (index)
{
case 0:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "L/R Cross";
param.ranges.def = 35.0f;
break;
case 1:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "Drive";
param.ranges.def = 56.0f;
break;
case 2:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "Level";
param.ranges.def = 70.0f;
break;
case 3:
hints |= PARAMETER_IS_AUTOMABLE|PARAMETER_USES_SCALEPOINTS;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_USES_SCALEPOINTS;
param.name = "Type";
param.ranges.def = 0.0f;
param.ranges.max = 13.0f;
@@ -595,29 +595,29 @@ protected:
scalePoints[13].value = 13.0f;
break;
case 4:
hints |= PARAMETER_IS_AUTOMABLE|PARAMETER_IS_BOOLEAN;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN;
param.name = "Negate";
param.ranges.def = 0.0f;
param.ranges.max = 1.0f;
break;
case 5:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "Low-Pass Filter";
param.ranges.def = 96.0f;
break;
case 6:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "High-Pass Filter";
param.ranges.def = 0.0f;
break;
case 7:
hints |= PARAMETER_IS_AUTOMABLE|PARAMETER_IS_BOOLEAN;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN;
param.name = "Stereo";
param.ranges.def = 0.0f;
param.ranges.max = 1.0f;
break;
case 8:
hints |= PARAMETER_IS_AUTOMABLE|PARAMETER_IS_BOOLEAN;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN;
param.name = "Pre-Filtering";
param.ranges.def = 0.0f;
param.ranges.max = 1.0f;
@@ -706,7 +706,7 @@ protected:
static NativeParameter param;
static NativeParameterScalePoint scalePoints[2];

int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_INTEGER;
int hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_INTEGER;

param.name = nullptr;
param.unit = nullptr;
@@ -722,17 +722,17 @@ protected:
switch (index)
{
case 0:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "LFO Frequency";
param.ranges.def = 80.0f;
break;
case 1:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "LFO Randomness";
param.ranges.def = 0.0f;
break;
case 2:
hints |= PARAMETER_IS_AUTOMABLE|PARAMETER_IS_BOOLEAN|PARAMETER_USES_SCALEPOINTS;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN|NATIVE_PARAMETER_USES_SCALEPOINTS;
param.name = "LFO Type";
param.ranges.def = 0.0f;
param.ranges.max = 1.0f;
@@ -744,28 +744,28 @@ protected:
scalePoints[1].value = 1.0f;
break;
case 3:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "LFO Stereo";
param.ranges.def = 64.0f;
break;
case 4:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "LFO Depth";
param.ranges.def = 0.0f;
break;
case 5:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "Amp sns";
param.ranges.def = 90.0f;
break;
case 6:
hints |= PARAMETER_IS_AUTOMABLE|PARAMETER_IS_BOOLEAN;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN;
param.name = "Amp sns inv";
param.ranges.def = 0.0f;
param.ranges.max = 1.0f;
break;
case 7:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "Amp Smooth";
param.ranges.def = 60.0f;
break;
@@ -849,7 +849,7 @@ protected:

static NativeParameter param;

int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_INTEGER;
int hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_INTEGER;

param.name = nullptr;
param.unit = nullptr;
@@ -865,27 +865,27 @@ protected:
switch (index)
{
case 0:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "Delay";
param.ranges.def = 35.0f;
break;
case 1:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "L/R Delay";
param.ranges.def = 64.0f;
break;
case 2:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "L/R Cross";
param.ranges.def = 30.0f;
break;
case 3:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "Feedback";
param.ranges.def = 59.0f;
break;
case 4:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "High Damp";
param.ranges.def = 0.0f;
break;
@@ -982,7 +982,7 @@ protected:
static NativeParameter param;
static NativeParameterScalePoint scalePoints[2];

int hints = PARAMETER_IS_ENABLED|PARAMETER_IS_INTEGER;
int hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_INTEGER;

param.name = nullptr;
param.unit = nullptr;
@@ -998,17 +998,17 @@ protected:
switch (index)
{
case 0:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "LFO Frequency";
param.ranges.def = 36.0f;
break;
case 1:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "LFO Randomness";
param.ranges.def = 0.0f;
break;
case 2:
hints |= PARAMETER_IS_AUTOMABLE|PARAMETER_IS_BOOLEAN|PARAMETER_USES_SCALEPOINTS;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN|NATIVE_PARAMETER_USES_SCALEPOINTS;
param.name = "LFO Type";
param.ranges.def = 0.0f;
param.ranges.max = 1.0f;
@@ -1020,17 +1020,17 @@ protected:
scalePoints[1].value = 1.0f;
break;
case 3:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "LFO Stereo";
param.ranges.def = 64.0f;
break;
case 4:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "Depth";
param.ranges.def = 110.0f;
break;
case 5:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "Feedback";
param.ranges.def = 64.0f;
break;
@@ -1041,34 +1041,34 @@ protected:
param.ranges.max = 12.0f;
break;
case 7:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "L/R Cross|Offset";
param.ranges.def = 0.0f;
break;
case 8:
hints |= PARAMETER_IS_AUTOMABLE|PARAMETER_IS_BOOLEAN;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN;
param.name = "Subtract Output";
param.ranges.def = 0.0f;
param.ranges.max = 1.0f;
break;
case 9:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "Phase|Width";
param.ranges.def = 20.0f;
break;
case 10:
hints |= PARAMETER_IS_AUTOMABLE|PARAMETER_IS_BOOLEAN;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN;
param.name = "Hyper";
param.ranges.def = 0.0f;
param.ranges.max = 1.0f;
break;
case 11:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "Distortion";
param.ranges.def = 0.0f;
break;
case 12:
hints |= PARAMETER_IS_AUTOMABLE|PARAMETER_IS_BOOLEAN;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE|NATIVE_PARAMETER_IS_BOOLEAN;
param.name = "Analog";
param.ranges.def = 0.0f;
param.ranges.max = 1.0f;
@@ -1175,7 +1175,7 @@ protected:
static NativeParameter param;
static NativeParameterScalePoint scalePoints[3];

int hints = PARAMETER_IS_ENABLED | PARAMETER_IS_INTEGER;
int hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_INTEGER;

param.name = nullptr;
param.unit = nullptr;
@@ -1191,7 +1191,7 @@ protected:
switch (index)
{
case 0:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "Time";
param.ranges.def = 63.0f;
break;
@@ -1200,7 +1200,7 @@ protected:
param.ranges.def = 24.0f;
break;
case 2:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "Feedback";
param.ranges.def = 0.0f;
break;
@@ -1221,13 +1221,13 @@ protected:
param.ranges.def = 5.0f;
break;
case 7:
hints |= PARAMETER_IS_AUTOMABLE;
hints |= NATIVE_PARAMETER_IS_AUTOMABLE;
param.name = "Damp";
param.ranges.def = 83.0f;
param.ranges.min = 64.0f;
break;
case 8:
hints |= PARAMETER_USES_SCALEPOINTS;
hints |= NATIVE_PARAMETER_USES_SCALEPOINTS;
param.name = "Type";
param.ranges.def = 1.0f;
param.ranges.max = 2.0f;
@@ -1333,8 +1333,8 @@ protected:
// -----------------------------------------------------------------------

static const NativePluginDescriptor fxAlienWahDesc = {
/* category */ PLUGIN_CATEGORY_MODULATOR,
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_USES_PANNING|PLUGIN_NEEDS_FIXED_BUFFERS),
/* category */ NATIVE_PLUGIN_CATEGORY_MODULATOR,
/* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE|NATIVE_PLUGIN_USES_PANNING|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
/* supports */ static_cast<NativePluginSupports>(0x0),
/* audioIns */ 2,
/* audioOuts */ 2,
@@ -1350,8 +1350,8 @@ static const NativePluginDescriptor fxAlienWahDesc = {
};

static const NativePluginDescriptor fxChorusDesc = {
/* category */ PLUGIN_CATEGORY_MODULATOR,
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_USES_PANNING|PLUGIN_NEEDS_FIXED_BUFFERS),
/* category */ NATIVE_PLUGIN_CATEGORY_MODULATOR,
/* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE|NATIVE_PLUGIN_USES_PANNING|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
/* supports */ static_cast<NativePluginSupports>(0x0),
/* audioIns */ 2,
/* audioOuts */ 2,
@@ -1367,8 +1367,8 @@ static const NativePluginDescriptor fxChorusDesc = {
};

static const NativePluginDescriptor fxDistortionDesc = {
/* category */ PLUGIN_CATEGORY_MODULATOR,
/* hints */ static_cast<NativePluginHints>(PLUGIN_USES_PANNING|PLUGIN_NEEDS_FIXED_BUFFERS),
/* category */ NATIVE_PLUGIN_CATEGORY_MODULATOR,
/* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_USES_PANNING|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
/* supports */ static_cast<NativePluginSupports>(0x0),
/* audioIns */ 2,
/* audioOuts */ 2,
@@ -1384,8 +1384,8 @@ static const NativePluginDescriptor fxDistortionDesc = {
};

static const NativePluginDescriptor fxDynamicFilterDesc = {
/* category */ PLUGIN_CATEGORY_FILTER,
/* hints */ static_cast<NativePluginHints>(PLUGIN_USES_PANNING|PLUGIN_NEEDS_FIXED_BUFFERS),
/* category */ NATIVE_PLUGIN_CATEGORY_FILTER,
/* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_USES_PANNING|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
/* supports */ static_cast<NativePluginSupports>(0x0),
/* audioIns */ 2,
/* audioOuts */ 2,
@@ -1401,8 +1401,8 @@ static const NativePluginDescriptor fxDynamicFilterDesc = {
};

static const NativePluginDescriptor fxEchoDesc = {
/* category */ PLUGIN_CATEGORY_DELAY,
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_RTSAFE|PLUGIN_USES_PANNING|PLUGIN_NEEDS_FIXED_BUFFERS),
/* category */ NATIVE_PLUGIN_CATEGORY_DELAY,
/* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_RTSAFE|NATIVE_PLUGIN_USES_PANNING|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
/* supports */ static_cast<NativePluginSupports>(0x0),
/* audioIns */ 2,
/* audioOuts */ 2,
@@ -1418,8 +1418,8 @@ static const NativePluginDescriptor fxEchoDesc = {
};

static const NativePluginDescriptor fxPhaserDesc = {
/* category */ PLUGIN_CATEGORY_MODULATOR,
/* hints */ static_cast<NativePluginHints>(PLUGIN_USES_PANNING|PLUGIN_NEEDS_FIXED_BUFFERS),
/* category */ NATIVE_PLUGIN_CATEGORY_MODULATOR,
/* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_USES_PANNING|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
/* supports */ static_cast<NativePluginSupports>(0x0),
/* audioIns */ 2,
/* audioOuts */ 2,
@@ -1435,8 +1435,8 @@ static const NativePluginDescriptor fxPhaserDesc = {
};

static const NativePluginDescriptor fxReverbDesc = {
/* category */ PLUGIN_CATEGORY_DELAY,
/* hints */ static_cast<NativePluginHints>(PLUGIN_USES_PANNING|PLUGIN_NEEDS_FIXED_BUFFERS),
/* category */ NATIVE_PLUGIN_CATEGORY_DELAY,
/* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_USES_PANNING|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS),
/* supports */ static_cast<NativePluginSupports>(0x0),
/* audioIns */ 2,
/* audioOuts */ 2,


+ 9
- 5
source/modules/native-plugins/zynaddsubfx-synth.cpp View File

@@ -809,13 +809,17 @@ public:
// -----------------------------------------------------------------------

static const NativePluginDescriptor zynaddsubfxDesc = {
/* category */ PLUGIN_CATEGORY_SYNTH,
/* category */ NATIVE_PLUGIN_CATEGORY_SYNTH,
/* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH
#ifdef WANT_ZYNADDSUBFX_UI
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_SYNTH|PLUGIN_HAS_UI|PLUGIN_USES_MULTI_PROGS|PLUGIN_USES_STATE),
#else
/* hints */ static_cast<NativePluginHints>(PLUGIN_IS_SYNTH|PLUGIN_USES_MULTI_PROGS|PLUGIN_USES_STATE),
|NATIVE_PLUGIN_HAS_UI
#endif
/* supports */ static_cast<NativePluginSupports>(PLUGIN_SUPPORTS_CONTROL_CHANGES|PLUGIN_SUPPORTS_NOTE_AFTERTOUCH|PLUGIN_SUPPORTS_PITCHBEND|PLUGIN_SUPPORTS_ALL_SOUND_OFF),
|NATIVE_PLUGIN_USES_MULTI_PROGS
|NATIVE_PLUGIN_USES_STATE),
/* supports */ static_cast<NativePluginSupports>(NATIVE_PLUGIN_SUPPORTS_CONTROL_CHANGES
|NATIVE_PLUGIN_SUPPORTS_NOTE_AFTERTOUCH
|NATIVE_PLUGIN_SUPPORTS_PITCHBEND
|NATIVE_PLUGIN_SUPPORTS_ALL_SOUND_OFF),
/* audioIns */ 0,
/* audioOuts */ 2,
/* midiIns */ 1,


+ 1
- 1
source/plugin/carla-base.cpp View File

@@ -54,7 +54,7 @@ struct PluginListManager {
const NativePluginDescriptor* const desc(CarlaPlugin::getNativePluginDescriptor(i));

// Open/Save not possible in plugins
if (desc->hints & PLUGIN_NEEDS_UI_OPEN_SAVE)
if (desc->hints & NATIVE_PLUGIN_NEEDS_UI_OPEN_SAVE)
continue;

// skip some plugins


+ 24
- 24
source/plugin/carla-lv2-export.cpp View File

@@ -215,25 +215,25 @@ static void writePluginFile(const NativePluginDescriptor* const pluginDesc)

switch (pluginDesc->category)
{
case PLUGIN_CATEGORY_SYNTH:
case NATIVE_PLUGIN_CATEGORY_SYNTH:
text += " a lv2:InstrumentPlugin, lv2:Plugin ;\n";
break;
case PLUGIN_CATEGORY_DELAY:
case NATIVE_PLUGIN_CATEGORY_DELAY:
text += " a lv2:DelayPlugin, lv2:Plugin ;\n";
break;
case PLUGIN_CATEGORY_EQ:
case NATIVE_PLUGIN_CATEGORY_EQ:
text += " a lv2:EQPlugin, lv2:Plugin ;\n";
break;
case PLUGIN_CATEGORY_FILTER:
case NATIVE_PLUGIN_CATEGORY_FILTER:
text += " a lv2:FilterPlugin, lv2:Plugin ;\n";
break;
case PLUGIN_CATEGORY_DYNAMICS:
case NATIVE_PLUGIN_CATEGORY_DYNAMICS:
text += " a lv2:DynamicsPlugin, lv2:Plugin ;\n";
break;
case PLUGIN_CATEGORY_MODULATOR:
case NATIVE_PLUGIN_CATEGORY_MODULATOR:
text += " a lv2:ModulatorPlugin, lv2:Plugin ;\n";
break;
case PLUGIN_CATEGORY_UTILITY:
case NATIVE_PLUGIN_CATEGORY_UTILITY:
text += " a lv2:UtilityPlugin, lv2:Plugin ;\n";
break;
default:
@@ -246,12 +246,12 @@ static void writePluginFile(const NativePluginDescriptor* const pluginDesc)
// -------------------------------------------------------------------
// Features

if (pluginDesc->hints & PLUGIN_IS_RTSAFE)
if (pluginDesc->hints & NATIVE_PLUGIN_IS_RTSAFE)
text += " lv2:optionalFeature <" LV2_CORE__hardRTCapable "> ;\n\n";

text += " lv2:requiredFeature <" LV2_BUF_SIZE__boundedBlockLength "> ,\n";

if (pluginDesc->hints & PLUGIN_NEEDS_FIXED_BUFFERS)
if (pluginDesc->hints & NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS)
text += " <" LV2_BUF_SIZE__fixedBlockLength "> ,\n";

text += " <" LV2_OPTIONS__options "> ,\n";
@@ -263,12 +263,12 @@ static void writePluginFile(const NativePluginDescriptor* const pluginDesc)

text += " lv2:extensionData <" LV2_OPTIONS__interface ">";

if (pluginDesc->hints & PLUGIN_USES_STATE)
if (pluginDesc->hints & NATIVE_PLUGIN_USES_STATE)
{
text += " ,\n";
text += " <" LV2_STATE__interface ">";

if (pluginDesc->category != PLUGIN_CATEGORY_SYNTH)
if (pluginDesc->category != NATIVE_PLUGIN_CATEGORY_SYNTH)
{
text += " ,\n";
text += " <" LV2_PROGRAMS__Interface "> ;\n";
@@ -276,7 +276,7 @@ static void writePluginFile(const NativePluginDescriptor* const pluginDesc)
else
text += " ;\n";
}
else if (pluginDesc->category != PLUGIN_CATEGORY_SYNTH)
else if (pluginDesc->category != NATIVE_PLUGIN_CATEGORY_SYNTH)
{
text += " ,\n";
text += " <" LV2_PROGRAMS__Interface "> ;\n";
@@ -289,7 +289,7 @@ static void writePluginFile(const NativePluginDescriptor* const pluginDesc)
// -------------------------------------------------------------------
// UIs

if (pluginDesc->hints & PLUGIN_HAS_UI)
if (pluginDesc->hints & NATIVE_PLUGIN_HAS_UI)
{
text += " ui:ui <http://kxstudio.sf.net/carla/ui> ;\n";
text += "\n";
@@ -298,13 +298,13 @@ static void writePluginFile(const NativePluginDescriptor* const pluginDesc)
// -------------------------------------------------------------------
// First MIDI/Time port

if (pluginDesc->midiIns > 0 || (pluginDesc->hints & PLUGIN_USES_TIME) != 0)
if (pluginDesc->midiIns > 0 || (pluginDesc->hints & NATIVE_PLUGIN_USES_TIME) != 0)
{
text += " lv2:port [\n";
text += " a lv2:InputPort, atom:AtomPort ;\n";
text += " atom:bufferType atom:Sequence ;\n";

if (pluginDesc->midiIns > 0 && (pluginDesc->hints & PLUGIN_USES_TIME) != 0)
if (pluginDesc->midiIns > 0 && (pluginDesc->hints & NATIVE_PLUGIN_USES_TIME) != 0)
{
text += " atom:supports <" LV2_MIDI__MidiEvent "> ,\n";
text += " <" LV2_TIME__Position "> ;\n";
@@ -467,7 +467,7 @@ static void writePluginFile(const NativePluginDescriptor* const pluginDesc)
if (i == 0)
text += " lv2:port [\n";

if (paramInfo->hints & PARAMETER_IS_OUTPUT)
if (paramInfo->hints & NATIVE_PARAMETER_IS_OUTPUT)
text += " a lv2:OutputPort, lv2:ControlPort ;\n";
else
text += " a lv2:InputPort, lv2:ControlPort ;\n";
@@ -484,21 +484,21 @@ static void writePluginFile(const NativePluginDescriptor* const pluginDesc)
text += " lv2:minimum " + String::formatted("%f", paramInfo->ranges.min) + " ;\n";
text += " lv2:maximum " + String::formatted("%f", paramInfo->ranges.max) + " ;\n";

if (paramInfo->hints & PARAMETER_IS_ENABLED)
if (paramInfo->hints & NATIVE_PARAMETER_IS_ENABLED)
{
if ((paramInfo->hints & PARAMETER_IS_AUTOMABLE) == 0)
if ((paramInfo->hints & NATIVE_PARAMETER_IS_AUTOMABLE) == 0)
text += " lv2:portProperty <" LV2_PORT_PROPS__expensive "> ;\n";
if (paramInfo->hints & PARAMETER_IS_BOOLEAN)
if (paramInfo->hints & NATIVE_PARAMETER_IS_BOOLEAN)
text += " lv2:portProperty lv2:toggled ;\n";
if (paramInfo->hints & PARAMETER_IS_INTEGER)
if (paramInfo->hints & NATIVE_PARAMETER_IS_INTEGER)
text += " lv2:portProperty lv2:integer ;\n";
if (paramInfo->hints & PARAMETER_IS_LOGARITHMIC)
if (paramInfo->hints & NATIVE_PARAMETER_IS_LOGARITHMIC)
text += " lv2:portProperty <" LV2_PORT_PROPS__logarithmic "> ;\n";
if (paramInfo->hints & PARAMETER_USES_SAMPLE_RATE)
if (paramInfo->hints & NATIVE_PARAMETER_USES_SAMPLE_RATE)
text += " lv2:portProperty lv2:toggled ;\n";
if (paramInfo->hints & PARAMETER_USES_SCALEPOINTS)
if (paramInfo->hints & NATIVE_PARAMETER_USES_SCALEPOINTS)
text += " lv2:portProperty lv2:enumeration ;\n";
if (paramInfo->hints & PARAMETER_USES_CUSTOM_TEXT)
if (paramInfo->hints & NATIVE_PARAMETER_USES_CUSTOM_TEXT)
pass(); // TODO: custom lv2 extension for this
}
else


+ 20
- 20
source/plugin/carla-lv2.cpp View File

@@ -168,7 +168,7 @@ public:

if (fDescriptor->midiIns > 0)
fUI.portOffset += desc->midiIns;
else if (fDescriptor->hints & PLUGIN_USES_TIME)
else if (fDescriptor->hints & NATIVE_PLUGIN_USES_TIME)
fUI.portOffset += 1;

fUI.portOffset += desc->midiOuts;
@@ -262,14 +262,14 @@ public:

curValue = *fPorts.paramsPtr[i];

if ((! carla_compareFloats(fPorts.paramsLast[i], curValue)) && (fDescriptor->get_parameter_info(fHandle, i)->hints & PARAMETER_IS_OUTPUT) == 0)
if ((! carla_compareFloats(fPorts.paramsLast[i], curValue)) && (fDescriptor->get_parameter_info(fHandle, i)->hints & NATIVE_PARAMETER_IS_OUTPUT) == 0)
{
fPorts.paramsLast[i] = curValue;
fDescriptor->set_parameter_value(fHandle, i, curValue);
}
}

if (fDescriptor->midiIns > 0 || (fDescriptor->hints & PLUGIN_USES_TIME) != 0)
if (fDescriptor->midiIns > 0 || (fDescriptor->hints & NATIVE_PLUGIN_USES_TIME) != 0)
{
fMidiEventCount = 0;
carla_zeroStruct<NativeMidiEvent>(fMidiEvents, kMaxMidiEvents*2);
@@ -549,7 +549,7 @@ public:
fBufferSize = static_cast<uint32_t>(value);

if (fDescriptor->dispatcher != nullptr)
fDescriptor->dispatcher(fHandle, PLUGIN_OPCODE_BUFFER_SIZE_CHANGED, 0, value, nullptr, 0.0f);
fDescriptor->dispatcher(fHandle, NATIVE_PLUGIN_OPCODE_BUFFER_SIZE_CHANGED, 0, value, nullptr, 0.0f);
}
else
carla_stderr("Host changed maxBlockLength but with wrong value type");
@@ -564,7 +564,7 @@ public:
fSampleRate = value;

if (fDescriptor->dispatcher != nullptr)
fDescriptor->dispatcher(fHandle, PLUGIN_OPCODE_SAMPLE_RATE_CHANGED, 0, 0, nullptr, (float)fSampleRate);
fDescriptor->dispatcher(fHandle, NATIVE_PLUGIN_OPCODE_SAMPLE_RATE_CHANGED, 0, 0, nullptr, (float)fSampleRate);
}
else
carla_stderr("Host changed sampleRate but with wrong value type");
@@ -576,7 +576,7 @@ public:

const LV2_Program_Descriptor* lv2_get_program(const uint32_t index)
{
if (fDescriptor->category == PLUGIN_CATEGORY_SYNTH)
if (fDescriptor->category == NATIVE_PLUGIN_CATEGORY_SYNTH)
return nullptr;
if (fDescriptor->get_midi_program_count == nullptr)
return nullptr;
@@ -599,7 +599,7 @@ public:

void lv2_select_program(uint32_t bank, uint32_t program)
{
if (fDescriptor->category == PLUGIN_CATEGORY_SYNTH)
if (fDescriptor->category == NATIVE_PLUGIN_CATEGORY_SYNTH)
return;
if (fDescriptor->set_midi_program == nullptr)
return;
@@ -609,7 +609,7 @@ public:

LV2_State_Status lv2_save(const LV2_State_Store_Function store, const LV2_State_Handle handle, const uint32_t /*flags*/, const LV2_Feature* const* const /*features*/) const
{
if ((fDescriptor->hints & PLUGIN_USES_STATE) == 0 || fDescriptor->get_state == nullptr)
if ((fDescriptor->hints & NATIVE_PLUGIN_USES_STATE) == 0 || fDescriptor->get_state == nullptr)
return LV2_STATE_ERR_NO_FEATURE;

if (char* const state = fDescriptor->get_state(fHandle))
@@ -624,7 +624,7 @@ public:

LV2_State_Status lv2_restore(const LV2_State_Retrieve_Function retrieve, const LV2_State_Handle handle, uint32_t flags, const LV2_Feature* const* const /*features*/) const
{
if ((fDescriptor->hints & PLUGIN_USES_STATE) == 0 || fDescriptor->set_state == nullptr)
if ((fDescriptor->hints & NATIVE_PLUGIN_USES_STATE) == 0 || fDescriptor->set_state == nullptr)
return LV2_STATE_ERR_NO_FEATURE;

size_t size = 0;
@@ -737,7 +737,7 @@ public:

void lv2ui_select_program(uint32_t bank, uint32_t program) const
{
if (fDescriptor->category == PLUGIN_CATEGORY_SYNTH)
if (fDescriptor->category == NATIVE_PLUGIN_CATEGORY_SYNTH)
return;
if (fDescriptor->ui_set_midi_program == nullptr)
return;
@@ -883,15 +883,15 @@ protected:

switch (opcode)
{
case HOST_OPCODE_NULL:
case HOST_OPCODE_UPDATE_PARAMETER:
case HOST_OPCODE_UPDATE_MIDI_PROGRAM:
case HOST_OPCODE_RELOAD_PARAMETERS:
case HOST_OPCODE_RELOAD_MIDI_PROGRAMS:
case HOST_OPCODE_RELOAD_ALL:
case NATIVE_HOST_OPCODE_NULL:
case NATIVE_HOST_OPCODE_UPDATE_PARAMETER:
case NATIVE_HOST_OPCODE_UPDATE_MIDI_PROGRAM:
case NATIVE_HOST_OPCODE_RELOAD_PARAMETERS:
case NATIVE_HOST_OPCODE_RELOAD_MIDI_PROGRAMS:
case NATIVE_HOST_OPCODE_RELOAD_ALL:
// nothing
break;
case HOST_OPCODE_UI_UNAVAILABLE:
case NATIVE_HOST_OPCODE_UI_UNAVAILABLE:
handleUiClosed();
break;
}
@@ -909,7 +909,7 @@ protected:
{
for (uint32_t i=0; i < fPorts.paramCount; ++i)
{
if (fDescriptor->get_parameter_info(fHandle, i)->hints & PARAMETER_IS_OUTPUT)
if (fDescriptor->get_parameter_info(fHandle, i)->hints & NATIVE_PARAMETER_IS_OUTPUT)
{
fPorts.paramsLast[i] = fDescriptor->get_parameter_value(fHandle, i);

@@ -1089,7 +1089,7 @@ private:
for (uint32_t i=0; i < desc->midiIns; ++i)
eventsIn[i] = nullptr;
}
else if (desc->hints & PLUGIN_USES_TIME)
else if (desc->hints & NATIVE_PLUGIN_USES_TIME)
{
eventsIn = new LV2_Atom_Sequence*[1];
eventsIn[0] = nullptr;
@@ -1141,7 +1141,7 @@ private:
{
uint32_t index = 0;

if (desc->midiIns > 0 || (desc->hints & PLUGIN_USES_TIME) != 0)
if (desc->midiIns > 0 || (desc->hints & NATIVE_PLUGIN_USES_TIME) != 0)
{
if (port == index++)
{


+ 2
- 2
source/plugin/carla-vst.cpp View File

@@ -183,7 +183,7 @@ public:
fSampleRate = opt;

if (fDescriptor->dispatcher != nullptr)
fDescriptor->dispatcher(fHandle, PLUGIN_OPCODE_SAMPLE_RATE_CHANGED, 0, 0, nullptr, (float)fSampleRate);
fDescriptor->dispatcher(fHandle, NATIVE_PLUGIN_OPCODE_SAMPLE_RATE_CHANGED, 0, 0, nullptr, (float)fSampleRate);
break;

case effSetBlockSize:
@@ -193,7 +193,7 @@ public:
fBufferSize = static_cast<uint32_t>(value);

if (fDescriptor->dispatcher != nullptr)
fDescriptor->dispatcher(fHandle, PLUGIN_OPCODE_BUFFER_SIZE_CHANGED, 0, value, nullptr, 0.0f);
fDescriptor->dispatcher(fHandle, NATIVE_PLUGIN_OPCODE_BUFFER_SIZE_CHANGED, 0, value, nullptr, 0.0f);
break;

case effMainsChanged:


+ 4
- 1
source/tests/ansi-pedantic-test.c View File

@@ -28,13 +28,16 @@
# undef NULL
# define NULL nullptr
# endif
CARLA_BACKEND_USE_NAMESPACE
#else
# include <stdio.h>
#endif

int main(int argc, char* argv[])
{
#ifdef __cplusplus
CARLA_BACKEND_USE_NAMESPACE
#endif

ParameterData a;
ParameterRanges b;
MidiProgramData c;


Loading…
Cancel
Save