Move special effVendorSpecific handling for REAPER

It's a bit less hacky if we do the effVendorSpecific check where we're
supposed to be checking for those things.
This commit is contained in:
Robbert van der Helm
2021-04-24 20:23:23 +02:00
parent dae0fcab9f
commit 0d1cb0bd77
2 changed files with 14 additions and 8 deletions
+2 -8
View File
@@ -16,16 +16,10 @@
#include "vst2.h"
EventPayload DefaultDataConverter::read(const int opcode,
const int index,
EventPayload DefaultDataConverter::read(const int /*opcode*/,
const int /*index*/,
const intptr_t /*value*/,
const void* data) const {
// HACK: REAPER has recently started using `effVendorSpecific` with a
// non-pointer `data` argument, so we need to explicitly handle this
if (opcode == effVendorSpecific && index == effSetSpeakerArrangement) {
return static_cast<native_size_t>(reinterpret_cast<size_t>(data));
}
if (!data) {
return nullptr;
}