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 23:
23. effGetChunk
>= VST1.0
@see AudioEffect::getChunk()
host requests pointer to a Bank/Program chunk, plugin is responsible for memory allocation/de-allocation
of chunk
e[index]: 0 = isBank, 1 = isProgram
x[ptr]: pointer to chunk memory-block
x[return]: byteSize
C++ method:
VstInt32 AudioEffect::getChunk(void** data, 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.