Signed-off-by: falkTX <falktx@falktx.com>tags/v2.2.0-RC1
@@ -2701,7 +2701,7 @@ public: | |||||
pData->options |= PLUGIN_OPTION_SEND_ALL_SOUND_OFF; | pData->options |= PLUGIN_OPTION_SEND_ALL_SOUND_OFF; | ||||
if (fInfo.optionsAvailable & PLUGIN_OPTION_SKIP_SENDING_NOTES) | if (fInfo.optionsAvailable & PLUGIN_OPTION_SKIP_SENDING_NOTES) | ||||
if (isPluginOptionEnabled(options, PLUGIN_OPTION_SKIP_SENDING_NOTES)) | |||||
if (isPluginOptionInverseEnabled(options, PLUGIN_OPTION_SKIP_SENDING_NOTES)) | |||||
pData->options |= PLUGIN_OPTION_SKIP_SENDING_NOTES; | pData->options |= PLUGIN_OPTION_SKIP_SENDING_NOTES; | ||||
if (fInfo.optionsAvailable & PLUGIN_OPTION_SEND_PROGRAM_CHANGES) | if (fInfo.optionsAvailable & PLUGIN_OPTION_SEND_PROGRAM_CHANGES) | ||||
@@ -1754,7 +1754,7 @@ public: | |||||
pData->options |= PLUGIN_OPTION_SEND_ALL_SOUND_OFF; | pData->options |= PLUGIN_OPTION_SEND_ALL_SOUND_OFF; | ||||
if (isPluginOptionEnabled(options, PLUGIN_OPTION_MAP_PROGRAM_CHANGES)) | if (isPluginOptionEnabled(options, PLUGIN_OPTION_MAP_PROGRAM_CHANGES)) | ||||
pData->options |= PLUGIN_OPTION_MAP_PROGRAM_CHANGES; | pData->options |= PLUGIN_OPTION_MAP_PROGRAM_CHANGES; | ||||
if (isPluginOptionEnabled(options, PLUGIN_OPTION_SKIP_SENDING_NOTES)) | |||||
if (isPluginOptionInverseEnabled(options, PLUGIN_OPTION_SKIP_SENDING_NOTES)) | |||||
pData->options |= PLUGIN_OPTION_SKIP_SENDING_NOTES; | pData->options |= PLUGIN_OPTION_SKIP_SENDING_NOTES; | ||||
return true; | return true; | ||||
@@ -1788,7 +1788,7 @@ public: | |||||
if (isPluginOptionEnabled(options, PLUGIN_OPTION_SEND_PROGRAM_CHANGES)) | if (isPluginOptionEnabled(options, PLUGIN_OPTION_SEND_PROGRAM_CHANGES)) | ||||
pData->options |= PLUGIN_OPTION_SEND_PROGRAM_CHANGES; | pData->options |= PLUGIN_OPTION_SEND_PROGRAM_CHANGES; | ||||
if (isPluginOptionEnabled(options, PLUGIN_OPTION_SKIP_SENDING_NOTES)) | |||||
if (isPluginOptionInverseEnabled(options, PLUGIN_OPTION_SKIP_SENDING_NOTES)) | |||||
pData->options |= PLUGIN_OPTION_SKIP_SENDING_NOTES; | pData->options |= PLUGIN_OPTION_SKIP_SENDING_NOTES; | ||||
return true; | return true; | ||||
@@ -1466,7 +1466,7 @@ public: | |||||
pData->options |= PLUGIN_OPTION_SEND_ALL_SOUND_OFF; | pData->options |= PLUGIN_OPTION_SEND_ALL_SOUND_OFF; | ||||
if (isPluginOptionEnabled(options, PLUGIN_OPTION_SEND_PROGRAM_CHANGES)) | if (isPluginOptionEnabled(options, PLUGIN_OPTION_SEND_PROGRAM_CHANGES)) | ||||
pData->options |= PLUGIN_OPTION_SEND_PROGRAM_CHANGES; | pData->options |= PLUGIN_OPTION_SEND_PROGRAM_CHANGES; | ||||
if (isPluginOptionEnabled(options, PLUGIN_OPTION_SKIP_SENDING_NOTES)) | |||||
if (isPluginOptionInverseEnabled(options, PLUGIN_OPTION_SKIP_SENDING_NOTES)) | |||||
pData->options |= PLUGIN_OPTION_SKIP_SENDING_NOTES; | pData->options |= PLUGIN_OPTION_SKIP_SENDING_NOTES; | ||||
} | } | ||||
@@ -3042,7 +3042,7 @@ public: | |||||
pData->options |= PLUGIN_OPTION_SEND_PITCHBEND; | pData->options |= PLUGIN_OPTION_SEND_PITCHBEND; | ||||
if (isPluginOptionEnabled(options, PLUGIN_OPTION_SEND_ALL_SOUND_OFF)) | if (isPluginOptionEnabled(options, PLUGIN_OPTION_SEND_ALL_SOUND_OFF)) | ||||
pData->options |= PLUGIN_OPTION_SEND_ALL_SOUND_OFF; | pData->options |= PLUGIN_OPTION_SEND_ALL_SOUND_OFF; | ||||
if (isPluginOptionEnabled(options, PLUGIN_OPTION_SKIP_SENDING_NOTES)) | |||||
if (isPluginOptionInverseEnabled(options, PLUGIN_OPTION_SKIP_SENDING_NOTES)) | |||||
pData->options |= PLUGIN_OPTION_SKIP_SENDING_NOTES; | pData->options |= PLUGIN_OPTION_SKIP_SENDING_NOTES; | ||||
} | } | ||||
} | } | ||||
@@ -6405,7 +6405,7 @@ public: | |||||
pData->options |= PLUGIN_OPTION_SEND_ALL_SOUND_OFF; | pData->options |= PLUGIN_OPTION_SEND_ALL_SOUND_OFF; | ||||
if (isPluginOptionEnabled(options, PLUGIN_OPTION_SEND_PROGRAM_CHANGES)) | if (isPluginOptionEnabled(options, PLUGIN_OPTION_SEND_PROGRAM_CHANGES)) | ||||
pData->options |= PLUGIN_OPTION_SEND_PROGRAM_CHANGES; | pData->options |= PLUGIN_OPTION_SEND_PROGRAM_CHANGES; | ||||
if (isPluginOptionEnabled(options, PLUGIN_OPTION_SKIP_SENDING_NOTES)) | |||||
if (isPluginOptionInverseEnabled(options, PLUGIN_OPTION_SKIP_SENDING_NOTES)) | |||||
pData->options |= PLUGIN_OPTION_SKIP_SENDING_NOTES; | pData->options |= PLUGIN_OPTION_SKIP_SENDING_NOTES; | ||||
} | } | ||||
@@ -3022,7 +3022,7 @@ public: | |||||
pData->options |= PLUGIN_OPTION_SEND_ALL_SOUND_OFF; | pData->options |= PLUGIN_OPTION_SEND_ALL_SOUND_OFF; | ||||
if (fDescriptor->midiIns > 0) | if (fDescriptor->midiIns > 0) | ||||
if (isPluginOptionEnabled(options, PLUGIN_OPTION_SKIP_SENDING_NOTES)) | |||||
if (isPluginOptionInverseEnabled(options, PLUGIN_OPTION_SKIP_SENDING_NOTES)) | |||||
pData->options |= PLUGIN_OPTION_SKIP_SENDING_NOTES; | pData->options |= PLUGIN_OPTION_SKIP_SENDING_NOTES; | ||||
if (fDescriptor->supports & NATIVE_PLUGIN_SUPPORTS_PROGRAM_CHANGES) | if (fDescriptor->supports & NATIVE_PLUGIN_SUPPORTS_PROGRAM_CHANGES) | ||||
@@ -756,7 +756,7 @@ public: | |||||
pData->options |= PLUGIN_OPTION_SEND_PITCHBEND; | pData->options |= PLUGIN_OPTION_SEND_PITCHBEND; | ||||
if (isPluginOptionEnabled(options, PLUGIN_OPTION_SEND_ALL_SOUND_OFF)) | if (isPluginOptionEnabled(options, PLUGIN_OPTION_SEND_ALL_SOUND_OFF)) | ||||
pData->options |= PLUGIN_OPTION_SEND_ALL_SOUND_OFF; | pData->options |= PLUGIN_OPTION_SEND_ALL_SOUND_OFF; | ||||
if (isPluginOptionEnabled(options, PLUGIN_OPTION_SKIP_SENDING_NOTES)) | |||||
if (isPluginOptionInverseEnabled(options, PLUGIN_OPTION_SKIP_SENDING_NOTES)) | |||||
pData->options |= PLUGIN_OPTION_SKIP_SENDING_NOTES; | pData->options |= PLUGIN_OPTION_SKIP_SENDING_NOTES; | ||||
return true; | return true; | ||||
@@ -2644,7 +2644,7 @@ public: | |||||
pData->options |= PLUGIN_OPTION_SEND_ALL_SOUND_OFF; | pData->options |= PLUGIN_OPTION_SEND_ALL_SOUND_OFF; | ||||
if (isPluginOptionEnabled(options, PLUGIN_OPTION_SEND_PROGRAM_CHANGES)) | if (isPluginOptionEnabled(options, PLUGIN_OPTION_SEND_PROGRAM_CHANGES)) | ||||
pData->options |= PLUGIN_OPTION_SEND_PROGRAM_CHANGES; | pData->options |= PLUGIN_OPTION_SEND_PROGRAM_CHANGES; | ||||
if (isPluginOptionEnabled(options, PLUGIN_OPTION_SKIP_SENDING_NOTES)) | |||||
if (isPluginOptionInverseEnabled(options, PLUGIN_OPTION_SKIP_SENDING_NOTES)) | |||||
pData->options |= PLUGIN_OPTION_SKIP_SENDING_NOTES; | pData->options |= PLUGIN_OPTION_SKIP_SENDING_NOTES; | ||||
} | } | ||||
@@ -744,6 +744,16 @@ bool isPluginOptionEnabled(const uint options, const uint option) | |||||
return false; | return false; | ||||
} | } | ||||
static inline | |||||
bool isPluginOptionInverseEnabled(const uint options, const uint option) | |||||
{ | |||||
if (options == PLUGIN_OPTIONS_NULL) | |||||
return false; | |||||
if (options & option) | |||||
return true; | |||||
return false; | |||||
} | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
CARLA_BACKEND_END_NAMESPACE | CARLA_BACKEND_END_NAMESPACE | ||||