BASS.NET API for the Un4seen BASS Audio Library

BassVstBASS_VST_GetChunk Method

BASS.NET API for the Un4seen BASS Audio Library
Gets the VST plug-in state as a plain byte array (memory chunk storage).

Namespace:  Un4seen.Bass.AddOn.Vst
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax

public static byte[] BASS_VST_GetChunk(
	int vstHandle,
	bool isPreset
)

Parameters

vstHandle
Type: SystemInt32
The VST effect handle as returned by BASS_VST_ChannelSetDSP(Int32, String, BASSVSTDsp, Int32).
isPreset
Type: SystemBoolean
when saving a single program; for all programs.

Return Value

Type: Byte
The array of bytes representing the VST plug-in state - or if the VST doesn't support the chunk data mode.
Remarks

There are two ways to store the current state of a VST plug-In: Either trough the parameter interfaces (BASS_VST_GetParam(Int32, Int32) and BASS_VST_SetParam(Int32, Int32, Single)) or as an opaque memory block (chunk mode).

You might first queries this method to see, if the VST supports the chunk mode. If it is not implemented ( is returned), the values of all parameters might be used to save the plug-in state.

Chunk storage allows to save additional data (besides the parameter state) which is specific to the VST plug-in. Please note, that if you decide to use the chunk storage, you have to take care of saving and loading parameter states on your own (see BASS_VST_SetChunk(Int32, Boolean, Byte, Int32) for details)!

See Also

Reference