mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 20:40:11 +02:00
Explicitly handle VST2 callbacks with nullptrs
This is probably not needed, but we'll do it just in case another plugin does something similar.
This commit is contained in:
@@ -490,13 +490,33 @@ class HostCallbackDataConverter : DefaultDataConverter {
|
||||
case audioMasterGetProductString:
|
||||
return WantsString{};
|
||||
break;
|
||||
// HACK: DefaultDataConverter::read() should be able to handle all
|
||||
// NOTE: DefaultDataConverter::read() should be able to handle all
|
||||
// of these 'simple' opcodes, but Plugsound Free by UVI passes
|
||||
// random garbage for their data argument, which we would then
|
||||
// try to read as a string resulting in a memory error.
|
||||
// random garbage for their data argument. Because of that
|
||||
// `audioMasterWantMidi()` will segfault because when we'll
|
||||
// try to read that data as a string we'll start reading
|
||||
// unallocated memory. Even though no other plugins seem to do
|
||||
// this< we'll list all of these data-less opcodes just to be
|
||||
// sure. We're leaving out a few opcodes here, because I have
|
||||
// no clue whether some of the more obscure ones are supposed
|
||||
// to have an data argument or not.
|
||||
case audioMasterAutomate:
|
||||
case audioMasterVersion:
|
||||
case audioMasterCurrentId:
|
||||
case audioMasterIdle:
|
||||
case audioMasterWantMidi:
|
||||
case audioMasterSizeWindow:
|
||||
case audioMasterGetSampleRate:
|
||||
case audioMasterGetBlockSize:
|
||||
case audioMasterWantMidi:
|
||||
case audioMasterGetInputLatency:
|
||||
case audioMasterGetOutputLatency:
|
||||
case audioMasterGetCurrentProcessLevel:
|
||||
case audioMasterGetAutomationState:
|
||||
case audioMasterGetVendorVersion:
|
||||
case audioMasterGetLanguage:
|
||||
case audioMasterUpdateDisplay:
|
||||
case audioMasterBeginEdit:
|
||||
case audioMasterEndEdit:
|
||||
return nullptr;
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user