Ignore REAPER host function API requests

Apparently there is a plugin that uses these.
This commit is contained in:
Robbert van der Helm
2021-06-12 17:22:47 +02:00
parent 9ae0e8ca38
commit 9c439b62e3
5 changed files with 33 additions and 0 deletions
+4
View File
@@ -26,6 +26,10 @@ Versioning](https://semver.org/spec/v2.0.0.html).
### Fixed
- Fixed _Insert Piz Here_'s _midiLooper_ crashing in **REAPER** when the plugin
tries to use REAPER's [host function
API](https://www.reaper.fm/sdk/vst/vst_ext.php#vst_host) which currently isn't
supported by yabridge. We now explicitly ignore these requests.
- Fixed VST2 speaker arrangement configurations returned by the plugin not being
serialized correctly. No plugins seem to actually use these, so it should not
have caused any issues.
+3
View File
@@ -322,6 +322,9 @@ std::optional<std::string> opcode_to_string(bool is_dispatch, int opcode) {
case audioMasterGetInputSpeakerArrangement:
return "audioMasterGetInputSpeakerArrangement";
break;
case audioMasterDeadBeef:
return "0xdeadbeef";
break;
default:
return std::nullopt;
break;
+9
View File
@@ -89,6 +89,15 @@
*/
[[maybe_unused]] constexpr int kVstProcessPrecision32 = 0;
/**
* Used by VST2 plugins in REAPER to obtain pointers to host-specific functions
* implemented by REAPER.
*
* https://www.reaper.fm/sdk/vst/vst_ext.php#vst_host
*/
[[maybe_unused]] constexpr int audioMasterDeadBeef =
static_cast<int>(0xdeadbeef);
/**
* The struct that's being passed through the data parameter during the
* `effGetInputProperties` and `effGetOutputProperties` opcodes. Reverse
+14
View File
@@ -147,6 +147,20 @@ Vst2PluginBridge::Vst2PluginBridge(audioMasterCallback host_callback)
.value_payload = std::nullopt};
}
} break;
case audioMasterDeadBeef:
logger.log("");
logger.log(
" The plugin wants to use REAPER's host vendor "
"extensions");
logger.log(
" which currently aren't supported by yabridge.");
logger.log(" Ignoring the request.");
logger.log("");
return Vst2EventResult{.return_value = 0,
.payload = nullptr,
.value_payload = std::nullopt};
break;
}
return passthrough_event(&plugin, host_callback_function,
+3
View File
@@ -554,6 +554,9 @@ class HostCallbackDataConverter : public DefaultDataConverter {
case audioMasterUpdateDisplay:
case audioMasterBeginEdit:
case audioMasterEndEdit:
// NOTE: REAPER abuses the dispatcher to add their own opcodes
// outside of `audioMasterVendorSpecific`
case audioMasterDeadBeef:
return nullptr;
break;
default: