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 38:
38. effOfflineNotify
>= VST2.0 (offline)
@see AudioEffectX::offlineNotify()
e[index]: start flag
e[value]: count
e[ptr]: pointer to VstAudioFile array
x[return]: 1 = successful
C++ method:
bool AudioEffectX::offlineNotify(VstAudioFile* ptr, VstInt32 numAudioFiles, bool start)
Delphi method:
function AudioEffectX.offlineNotify(ptr: PVstAudioFile; numAudioFiles: VstInt32; start: boolean): boolean;
VstAudioFile structure:
struct VstAudioFile
{
VstInt32 flags; // see enum #VstAudioFileFlags
void* hostOwned; // any data private to Host
void* plugOwned; // any data private to plug-in
char name[kVstMaxFileNameLen]; // file title
VstInt32 uniqueId; // uniquely identify a file during a session
double sampleRate; // file sample rate
VstInt32 numChannels; // number of channels (1 for mono, 2 for stereo...)
double numFrames; // number of frames in the audio file
VstInt32 format; // Reserved for future use
double editCursorPosition; // -1 if no such cursor
double selectionStart; // frame index of first selected frame, or -1
double selectionSize; // number of frames in selection, or 0
VstInt32 selectedChannelsMask; // 1 bit per channel
VstInt32 numMarkers; // number of markers in the file
VstInt32 timeRulerUnit; // see doc for possible values
double timeRulerOffset; // offset in time ruler (positive or negative)
double tempo; // as BPM (Beats Per Minute)
VstInt32 timeSigNumerator; // time signature numerator
VstInt32 timeSigDenominator; // time signature denominator
VstInt32 ticksPerBlackNote; // resolution
VstInt32 smpteFrameRate; // SMPTE rate (set as in #VstTimeInfo)
char future[64]; // Reserved for future use
};
VstAudioFileFlags constants:
enum VstAudioFileFlags
{
kVstOfflineReadOnly = 1 << 0, // set by Host (in call #offlineNotify)
kVstOfflineNoRateConversion = 1 << 1, // set by Host (in call #offlineNotify)
kVstOfflineNoChannelChange = 1 << 2, // set by Host (in call #offlineNotify)
kVstOfflineCanProcessSelection = 1 << 10, // set by plug-in (in call #offlineStart)
kVstOfflineNoCrossfade = 1 << 11, // set by plug-in (in call #offlineStart)
kVstOfflineWantRead = 1 << 12, // set by plug-in (in call #offlineStart)
kVstOfflineWantWrite = 1 << 13, // set by plug-in (in call #offlineStart)
kVstOfflineWantWriteMarker = 1 << 14, // set by plug-in (in call #offlineStart)
kVstOfflineWantMoveCursor = 1 << 15, // set by plug-in (in call #offlineStart)
kVstOfflineWantSelect = 1 << 16 // set by plug-in (in call #offlineStart)
};