C++:
VstIntPtr function dispatcher(AEffect* e, VstInt32 opcode, VstInt32 index, VstIntPtr value,
void* ptr, float opt);
Delphi:
function dispatcher(e: PAEffect; opcode, index: VstInt32; value: VstIntPtr; ptr: pointer;
opt: Single): VstIntPtr; cdecl;
always returns 0, unless otherwise defined.
all string-pointers points to zero terminated strings.
e[ ]: = plugin receives as entry parameter
x[ ]: = plugin returns to host
dispatcher() function using opcode 24:
24. effSetChunk
>= VST1.0
@see AudioEffect::setChunk()
plug-in receives a Bank/Program chunk, host is responsible for memory allocation/de-allocation of chunk
e[index]: 0 = isBank, 1 = isProgram
e[value]: byteSize
e[ptr]: pointer to chunk memory-block
C++ method:
VstInt32 AudioEffect::setChunk(void* data, VstInt32 byteSize, bool isPreset)
Delphi method:
function AudioEffectX.getChunk(var data: pointer; isPreset: Boolean): VstInt32;
comments:
If your plug-in is configured to use chunks @see AudioEffect::programsAreChunks, the Host
will ask for a block of memory describing the current plug-in state for saving.
To restore the state at a later stage, the same data is passed back to AudioEffect::setChunk.
Alternatively, when not using chunk, the Host will simply save all parameter values.