Fix incorrect definition for vst_host_callback_t

This commit is contained in:
Xaymar
2025-08-06 03:56:51 +02:00
parent 3c7322c90d
commit 5e65ee89ca
+95 -40
View File
@@ -39,7 +39,7 @@ extern "C" {
#include <inttypes.h> #include <inttypes.h>
#endif #endif
/** VST Function Interface /** Standard calling convention across plug-ins and hosts.
* On some older Windows platforms this is not __cdecl but something similar to __stdcall. We don't really care about * On some older Windows platforms this is not __cdecl but something similar to __stdcall. We don't really care about
* those old platforms anyway so __cdecl it is. * those old platforms anyway so __cdecl it is.
*/ */
@@ -392,21 +392,21 @@ struct vst_speaker_properties_t {
/** Azimuth in Radians /** Azimuth in Radians
* Range: -PI (Left) through 0.0 (Right) to PI (Left) * Range: -PI (Left) through 0.0 (Right) to PI (Left)
* *
* Note: Must be 10.0 if this is a LFE. * @note Must be 10.0 if this is a LFE.
*/ */
float azimuth; float azimuth;
/** Altitude in Radians /** Altitude in Radians
* Range: -PI/2 (Bottom) to PI/2 (Top) * Range: -PI/2 (Bottom) to PI/2 (Top)
* *
* Note: Must be 10.0 if this is a LFE. * @note Must be 10.0 if this is a LFE.
*/ */
float altitude; float altitude;
/** Distance in Meters /** Distance in Meters
* range: 0 to +-Infinity * range: 0 to +-Infinity
* *
* Note: Must be 0.0 if this is a LFE. * @note Must be 0.0 if this is a LFE.
*/ */
float distance; float distance;
@@ -602,8 +602,8 @@ enum VST_HOST_OPCODE {
/** Notify the host that numInputs/numOutputs/delay/numParams has changed. /** Notify the host that numInputs/numOutputs/delay/numParams has changed.
* Only supported if the host replies @ref VST_STATUS_TRUE to @ref VST_HOST_OPCODE_SUPPORTS query for @ref vst_host_supports.acceptIOChanges. * Only supported if the host replies @ref VST_STATUS_TRUE to @ref VST_HOST_OPCODE_SUPPORTS query for @ref vst_host_supports.acceptIOChanges.
* *
* Note: In VST 2.3 and earlier calling this outside of @ref VST_EFFECT_OPCODE_IDLE may result in a crash. * @note In VST 2.3 and earlier calling this outside of @ref VST_EFFECT_OPCODE_IDLE may result in a crash.
* Note: In VST 2.3 and later this may only be called while between @ref VST_EFFECT_OPCODE_PROCESS_END and @ref VST_EFFECT_OPCODE_BEGIN. * @note In VST 2.3 and later this may only be called while between @ref VST_EFFECT_OPCODE_PROCESS_END and @ref VST_EFFECT_OPCODE_BEGIN.
* *
* @return @ref VST_STATUS_TRUE if supported and handled otherwise @ref VST_STATUS_FALSE. * @return @ref VST_STATUS_TRUE if supported and handled otherwise @ref VST_STATUS_FALSE.
*/ */
@@ -765,7 +765,7 @@ struct vst_host_supports_t {
* - @ref VST_HOST_OPCODE_CURRENT_EFFECT_ID * - @ref VST_HOST_OPCODE_CURRENT_EFFECT_ID
* - @ref VST_EFFECT_OPCODE_CONTAINER_NEXT_EFFECT_ID * - @ref VST_EFFECT_OPCODE_CONTAINER_NEXT_EFFECT_ID
* *
* Note: Is shell a reference to Windows shell menus? * @note Is shell a reference to Windows shell menus?
* *
* @return @ref VST_STATUS_TRUE if the host supports it _and_ the current plug-in is a container plug-in. * @return @ref VST_STATUS_TRUE if the host supports it _and_ the current plug-in is a container plug-in.
*/ */
@@ -810,7 +810,7 @@ struct vst_host_supports_t {
* @param p_str Zero terminated string or null on call. * @param p_str Zero terminated string or null on call.
* @return ? * @return ?
*/ */
typedef intptr_t (*vst_host_callback_t)(struct vst_effect_t* plugin, int32_t opcode, int32_t p_int1, int64_t p_int2, const char* p_str, float p_float); typedef intptr_t (VST_FUNCTION_INTERFACE *vst_host_callback_t)(struct vst_effect_t* plugin, int32_t opcode, int32_t p_int1, int64_t p_int2, const char* p_str, float p_float);
//------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------
// VST Plug-in/Effect related Things // VST Plug-in/Effect related Things
@@ -866,7 +866,7 @@ enum VST_EFFECT_CATEGORY {
* Examples: Loudness Meters, Volume Analysis, ... * Examples: Loudness Meters, Volume Analysis, ...
* *
* Supports: Tail Samples, MIDI * Supports: Tail Samples, MIDI
* Note: Delay causes crashes in some hosts. Fun. * @note Delay causes crashes in some hosts. Fun.
*/ */
VST_EFFECT_CATEGORY_03 = 0x03, VST_EFFECT_CATEGORY_03 = 0x03,
/** @sa VST_EFFECT_CATEGORY_03 */ /** @sa VST_EFFECT_CATEGORY_03 */
@@ -905,7 +905,7 @@ enum VST_EFFECT_CATEGORY {
* Examples: Noise Filtering, Upsamplers, ... * Examples: Noise Filtering, Upsamplers, ...
* *
* Supports: Delay, Tail Samples, MIDI * Supports: Delay, Tail Samples, MIDI
* Note: Some DAWs allocate additional processing time to these. * @note Some DAWs allocate additional processing time to these.
*/ */
VST_EFFECT_CATEGORY_08 = 0x08, VST_EFFECT_CATEGORY_08 = 0x08,
/** @sa VST_EFFECT_CATEGORY_08 */ /** @sa VST_EFFECT_CATEGORY_08 */
@@ -1296,9 +1296,9 @@ enum VST_EFFECT_OPCODE {
* *
* Ocasionally called simultaneously as WM_DRAW on windows. * Ocasionally called simultaneously as WM_DRAW on windows.
* *
* Note: Present in some VST 2.1 or earlier plugins. * @note Present in some VST 2.1 or earlier plugins.
* Note: Not present in many VST 2.4 plugins. * @important Appears to be Mac OS exclusive.
* Note: Only on Mac OS? * @deprecated (VST 2.4+) Likely deprecated in VST 2.4 and later.
*/ */
VST_EFFECT_OPCODE_10 = 0x10, VST_EFFECT_OPCODE_10 = 0x10,
/** @sa VST_EFFECT_OPCODE_10 */ /** @sa VST_EFFECT_OPCODE_10 */
@@ -1310,9 +1310,9 @@ enum VST_EFFECT_OPCODE {
* *
* Called at the same time mouse events happen. * Called at the same time mouse events happen.
* *
* Note: Present in some VST 2.1 or earlier plugins. * @note Present in some VST 2.1 or earlier plugins.
* Note: Not present in many VST 2.4 plugins. * @important Appears to be Mac OS exclusive.
* Note: Only on Mac OS? * @deprecated (VST 2.4+) Likely deprecated in VST 2.4 and later.
*/ */
VST_EFFECT_OPCODE_11 = 0x11, VST_EFFECT_OPCODE_11 = 0x11,
/** @sa VST_EFFECT_OPCODE_11 */ /** @sa VST_EFFECT_OPCODE_11 */
@@ -1324,9 +1324,9 @@ enum VST_EFFECT_OPCODE {
* *
* Called at the same time keyboard events happen. * Called at the same time keyboard events happen.
* *
* Note: Present in some VST 2.1 or earlier plugins. * @note Present in some VST 2.1 or earlier plugins.
* Note: Not present in many VST 2.4 plugins. * @important Appears to be Mac OS exclusive.
* Note: Only on Mac OS? * @deprecated (VST 2.4+) Likely deprecated in VST 2.4 and later.
*/ */
VST_EFFECT_OPCODE_12 = 0x12, VST_EFFECT_OPCODE_12 = 0x12,
/** @sa VST_EFFECT_OPCODE_12 */ /** @sa VST_EFFECT_OPCODE_12 */
@@ -1337,8 +1337,6 @@ enum VST_EFFECT_OPCODE {
/** Window/Editor Idle/Keep-Alive Callback? /** Window/Editor Idle/Keep-Alive Callback?
* *
* Does not receive any parameters. Randomly called when nothing happens? Idle/Keep-Alive callback? * Does not receive any parameters. Randomly called when nothing happens? Idle/Keep-Alive callback?
*
* Note: Not present in many VST 2.4 plugins.
*/ */
VST_EFFECT_OPCODE_13 = 0x13, VST_EFFECT_OPCODE_13 = 0x13,
/** @sa VST_EFFECT_OPCODE_13 */ /** @sa VST_EFFECT_OPCODE_13 */
@@ -1348,9 +1346,9 @@ enum VST_EFFECT_OPCODE {
* *
* Sometimes called when the editor window goes back into focus. * Sometimes called when the editor window goes back into focus.
* *
* Note: Present in some VST 2.1 or earlier plugins. * @note Present in some VST 2.1 or earlier plugins.
* Note: Not present in many VST 2.4 plugins. * @important Appears to be Mac OS exclusive.
* Note: Only on Mac OS? * @deprecated (VST 2.4+) Likely deprecated in VST 2.4 and later.
*/ */
VST_EFFECT_OPCODE_14 = 0x14, VST_EFFECT_OPCODE_14 = 0x14,
@@ -1358,17 +1356,17 @@ enum VST_EFFECT_OPCODE {
* *
* Sometimes called when the editor window goes out of focus. * Sometimes called when the editor window goes out of focus.
* *
* Note: Present in some VST 2.1 or earlier plugins. * @note Present in some VST 2.1 or earlier plugins.
* Note: Not present in many VST 2.4 plugins. * @important Appears to be Mac OS exclusive.
* Note: Only on Mac OS? * @deprecated (VST 2.4+) Likely deprecated in VST 2.4 and later.
*/ */
VST_EFFECT_OPCODE_15 = 0x15, VST_EFFECT_OPCODE_15 = 0x15,
/** /**
* *
* Note: Present in some VST 2.1 or earlier plugins. * @note Present in some VST 2.1 or earlier plugins.
* Note: Not present in many VST 2.4 plugins. * @important Almost all plug-ins return the @ref VST_FOURCC 'NvEf' (0x4E764566) here.
* Note: Some plugins always return the FourCC 'NvEf' (0x4E764566), other plugins return nothing. * @deprecated (VST 2.4+) Likely deprecated in VST 2.4 and later.
*/ */
VST_EFFECT_OPCODE_16 = 0x16, VST_EFFECT_OPCODE_16 = 0x16,
/** @sa VST_EFFECT_OPCODE_16 */ /** @sa VST_EFFECT_OPCODE_16 */
@@ -1409,11 +1407,13 @@ enum VST_EFFECT_OPCODE {
/** /**
* *
* Appears to be related to midi and audio events. * Appears to be related to midi and audio events.
* @important (VST 2.0+) Available from VST 2.0 onwards.
*/ */
VST_EFFECT_OPCODE_19 = 0x19, VST_EFFECT_OPCODE_19 = 0x19,
/** Can the parameter be automated? /** Can the parameter be automated?
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
* @param p_int1 Index of the parameter. * @param p_int1 Index of the parameter.
* @return 1 if the parameter can be automated, otherwise 0. * @return 1 if the parameter can be automated, otherwise 0.
*/ */
@@ -1427,6 +1427,7 @@ enum VST_EFFECT_OPCODE {
/** Set Parameter value from string representation. /** Set Parameter value from string representation.
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
* @param p_int1 Index of the parameter. * @param p_int1 Index of the parameter.
* @param p_ptr `const char*` Zero terminated string representation of the value to set. * @param p_ptr `const char*` Zero terminated string representation of the value to set.
* @return 1 if it worked, otherwise 0. * @return 1 if it worked, otherwise 0.
@@ -1440,11 +1441,13 @@ enum VST_EFFECT_OPCODE {
/** /**
* *
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
*/ */
VST_EFFECT_OPCODE_1C = 0x1C, VST_EFFECT_OPCODE_1C = 0x1C,
/** /**
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
* @sa VST_EFFECT_OPCODE_05 * @sa VST_EFFECT_OPCODE_05
*/ */
VST_EFFECT_OPCODE_1D = 0x1D, VST_EFFECT_OPCODE_1D = 0x1D,
@@ -1452,23 +1455,27 @@ enum VST_EFFECT_OPCODE {
/** /**
* *
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
*/ */
VST_EFFECT_OPCODE_1E = 0x1E, VST_EFFECT_OPCODE_1E = 0x1E,
/** Input connected. /** Input connected.
* *
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
*/ */
VST_EFFECT_OPCODE_1F = 0x1F, VST_EFFECT_OPCODE_1F = 0x1F,
/** Input disconnected. /** Input disconnected.
* *
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
*/ */
VST_EFFECT_OPCODE_20 = 0x20, VST_EFFECT_OPCODE_20 = 0x20,
/** Retrieve properties for the given input index. /** Retrieve properties for the given input index.
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
* @param p_int1 Index of the input to get the properties for. * @param p_int1 Index of the input to get the properties for.
* @param p_ptr Pointer to @ref vst_stream_properties_t for the selected input provided by the host. * @param p_ptr Pointer to @ref vst_stream_properties_t for the selected input provided by the host.
* @return @ref VST_STATUS_TRUE if p_ptr is updated, @ref VST_STATUS_FALSE otherwise. * @return @ref VST_STATUS_TRUE if p_ptr is updated, @ref VST_STATUS_FALSE otherwise.
@@ -1479,6 +1486,7 @@ enum VST_EFFECT_OPCODE {
/** Retrieve properties for the given output index. /** Retrieve properties for the given output index.
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
* @param p_int1 Index of the output to get the properties for. * @param p_int1 Index of the output to get the properties for.
* @param p_ptr Pointer to @ref vst_stream_properties_t for the selected output provided by the host. * @param p_ptr Pointer to @ref vst_stream_properties_t for the selected output provided by the host.
* @return @ref VST_STATUS_TRUE if p_ptr is updated, @ref VST_STATUS_FALSE otherwise. * @return @ref VST_STATUS_TRUE if p_ptr is updated, @ref VST_STATUS_FALSE otherwise.
@@ -1489,6 +1497,7 @@ enum VST_EFFECT_OPCODE {
/** Retrieve category of this effect. /** Retrieve category of this effect.
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
* @return The category that this effect is in, see @ref VST_CATEGORY. * @return The category that this effect is in, see @ref VST_CATEGORY.
*/ */
VST_EFFECT_OPCODE_23 = 0x23, VST_EFFECT_OPCODE_23 = 0x23,
@@ -1500,41 +1509,48 @@ enum VST_EFFECT_OPCODE {
/** /**
* *
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
*/ */
VST_EFFECT_OPCODE_24 = 0x24, VST_EFFECT_OPCODE_24 = 0x24,
/** /**
* *
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
*/ */
VST_EFFECT_OPCODE_25 = 0x25, VST_EFFECT_OPCODE_25 = 0x25,
/** /**
* *
* Seen in plug-ins with VST_CATEGORY_OFFLINE. * Seen in plug-ins with VST_CATEGORY_OFFLINE.
* @important (VST 2.0+) Available from VST 2.0 onwards.
*/ */
VST_EFFECT_OPCODE_26 = 0x26, VST_EFFECT_OPCODE_26 = 0x26,
/** /**
* *
* Seen in plug-ins with VST_CATEGORY_OFFLINE. * Seen in plug-ins with VST_CATEGORY_OFFLINE.
* @important (VST 2.0+) Available from VST 2.0 onwards.
*/ */
VST_EFFECT_OPCODE_27 = 0x27, VST_EFFECT_OPCODE_27 = 0x27,
/** /**
* *
* Seen in plug-ins with VST_CATEGORY_OFFLINE. * Seen in plug-ins with VST_CATEGORY_OFFLINE.
* @important (VST 2.0+) Available from VST 2.0 onwards.
*/ */
VST_EFFECT_OPCODE_28 = 0x28, VST_EFFECT_OPCODE_28 = 0x28,
/** /**
* *
* Seen in plug-ins with VST_CATEGORY_OFFLINE. * Seen in plug-ins with VST_CATEGORY_OFFLINE.
* @important (VST 2.0+) Available from VST 2.0 onwards.
*/ */
VST_EFFECT_OPCODE_29 = 0x29, VST_EFFECT_OPCODE_29 = 0x29,
/** Host wants to change the speaker arrangement. /** Host wants to change the speaker arrangement.
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
* @param p_int2 Pointer to a @ref vst_speaker_arrangement_t for the input. * @param p_int2 Pointer to a @ref vst_speaker_arrangement_t for the input.
* @param p_ptr Pointer to a @ref vst_speaker_arrangement_t for the output. * @param p_ptr Pointer to a @ref vst_speaker_arrangement_t for the output.
* @return @ref VST_STATUS_TRUE if we accept the new arrangement, @ref VST_STATUS_FALSE if we don't in which case * @return @ref VST_STATUS_TRUE if we accept the new arrangement, @ref VST_STATUS_FALSE if we don't in which case
@@ -1558,6 +1574,7 @@ enum VST_EFFECT_OPCODE {
* *
* See @ref VST_EFFECT_OPCODE_SUPPORTS with @ref vst_effect_supports.bypass for more information. * See @ref VST_EFFECT_OPCODE_SUPPORTS with @ref vst_effect_supports.bypass for more information.
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
* @param p_int2 Zero if bypassing the effect is disabled, otherwise 1. * @param p_int2 Zero if bypassing the effect is disabled, otherwise 1.
*/ */
VST_EFFECT_OPCODE_2C = 0x2C, VST_EFFECT_OPCODE_2C = 0x2C,
@@ -1566,6 +1583,7 @@ enum VST_EFFECT_OPCODE {
/** Retrieve the effect name into the ptr buffer. /** Retrieve the effect name into the ptr buffer.
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
* @bug Various hosts only provide a buffer that is 32 bytes long. * @bug Various hosts only provide a buffer that is 32 bytes long.
* @param p_ptr A zero terminated char buffer of size @ref VST_BUFFER_SIZE_EFFECT_NAME. * @param p_ptr A zero terminated char buffer of size @ref VST_BUFFER_SIZE_EFFECT_NAME.
* @return Always 0, even on failure. * @return Always 0, even on failure.
@@ -1581,7 +1599,8 @@ enum VST_EFFECT_OPCODE {
/** Translate an error code to a string. /** Translate an error code to a string.
* *
* @bug Some hosts provide unexpected data in p_ptr. * @bug Some hosts provide unexpected data in p_ptr.
* @deprecated (VST 2.4) Fairly sure this is deprecated in VST 2.4 and later. * @important (VST 2.0+) Available from VST 2.0 onwards.
* @deprecated (VST 2.4+) Fairly sure this is deprecated in VST 2.4 and later.
* @param p_ptr A zero terminated char buffer with undefined size. * @param p_ptr A zero terminated char buffer with undefined size.
* @return VST_STATUS_TRUE if we could translate the error, VST_STATUS_FALSE if not. * @return VST_STATUS_TRUE if we could translate the error, VST_STATUS_FALSE if not.
*/ */
@@ -1591,6 +1610,7 @@ enum VST_EFFECT_OPCODE {
/** Retrieve the vendor name into the ptr buffer. /** Retrieve the vendor name into the ptr buffer.
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
* @param p_ptr A zero terminated char buffer of @ref VST_BUFFER_SIZE_VENDOR size. * @param p_ptr A zero terminated char buffer of @ref VST_BUFFER_SIZE_VENDOR size.
*/ */
VST_EFFECT_OPCODE_2F = 0x2F, VST_EFFECT_OPCODE_2F = 0x2F,
@@ -1601,6 +1621,7 @@ enum VST_EFFECT_OPCODE {
/** Retrieve the product name into the ptr buffer. /** Retrieve the product name into the ptr buffer.
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
* @param p_ptr A zero terminated char buffer of @ref VST_BUFFER_SIZE_PRODUCT size. * @param p_ptr A zero terminated char buffer of @ref VST_BUFFER_SIZE_PRODUCT size.
*/ */
VST_EFFECT_OPCODE_30 = 0x30, VST_EFFECT_OPCODE_30 = 0x30,
@@ -1611,6 +1632,7 @@ enum VST_EFFECT_OPCODE {
/** Retrieve the vendor version in return value. /** Retrieve the vendor version in return value.
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
* @return Version. * @return Version.
*/ */
VST_EFFECT_OPCODE_31 = 0x31, VST_EFFECT_OPCODE_31 = 0x31,
@@ -1621,6 +1643,7 @@ enum VST_EFFECT_OPCODE {
/** User-defined Op-Code for VST extensions. /** User-defined Op-Code for VST extensions.
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
* All parameters are undefined by the standard and left up to the host/plug-in. Use @ref VST_EFFECT_OPCODE_SUPPORTS * All parameters are undefined by the standard and left up to the host/plug-in. Use @ref VST_EFFECT_OPCODE_SUPPORTS
* and @ref VST_EFFECT_OPCODE_VENDOR_NAME + @ref VST_EFFECT_OPCODE_VENDOR_VERSION to check if the plug-in is * and @ref VST_EFFECT_OPCODE_VENDOR_NAME + @ref VST_EFFECT_OPCODE_VENDOR_VERSION to check if the plug-in is
* compatible with your expected format. * compatible with your expected format.
@@ -1631,6 +1654,7 @@ enum VST_EFFECT_OPCODE {
/** Test for support of a specific named feature. /** Test for support of a specific named feature.
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
* @param p_ptr A zero terminated char buffer of undefined size containing the feature name. * @param p_ptr A zero terminated char buffer of undefined size containing the feature name.
* @return @ref VST_STATUS_YES if the feature is supported, @ref VST_STATUS_NO if the feature is not supported, * @return @ref VST_STATUS_YES if the feature is supported, @ref VST_STATUS_NO if the feature is not supported,
* @ref VST_STATUS_UNKNOWN in all other cases. * @ref VST_STATUS_UNKNOWN in all other cases.
@@ -1641,6 +1665,7 @@ enum VST_EFFECT_OPCODE {
/** Number of samples that are at the tail at the end of playback. /** Number of samples that are at the tail at the end of playback.
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
* @return @ref VST_STATUS_UNKNOWN for automatic tail size, @ref VST_STATUS_TRUE for no tail, any other number above * @return @ref VST_STATUS_UNKNOWN for automatic tail size, @ref VST_STATUS_TRUE for no tail, any other number above
* 1 for the number of samples the tail has. * 1 for the number of samples the tail has.
*/ */
@@ -1652,7 +1677,8 @@ enum VST_EFFECT_OPCODE {
/** Notify effect that it is idle? /** Notify effect that it is idle?
* *
* @deprecated As of VST 2.4 the default behavior is @ref VST_EFFECT_OPCODE_PROCESS_BEGIN and * @important (VST 2.0+) Available from VST 2.0 onwards.
* @deprecated (VST 2.4+) As of VST 2.4 the default behavior is @ref VST_EFFECT_OPCODE_PROCESS_BEGIN and
* @ref VST_EFFECT_OPCODE_PROCESS_END which allows cleaner control flows. * @ref VST_EFFECT_OPCODE_PROCESS_END which allows cleaner control flows.
* @sa vst_host_supports.startStopProcess * @sa vst_host_supports.startStopProcess
*/ */
@@ -1663,6 +1689,7 @@ enum VST_EFFECT_OPCODE {
/** /**
* *
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
* @deprecated (VST 2.4) Invalid in all VST 2.4 and later hosts. * @deprecated (VST 2.4) Invalid in all VST 2.4 and later hosts.
*/ */
VST_EFFECT_OPCODE_36 = 0x36, VST_EFFECT_OPCODE_36 = 0x36,
@@ -1670,12 +1697,14 @@ enum VST_EFFECT_OPCODE {
/** /**
* *
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
* @deprecated (VST 2.4) Invalid in all VST 2.4 and later hosts. * @deprecated (VST 2.4) Invalid in all VST 2.4 and later hosts.
*/ */
VST_EFFECT_OPCODE_37 = 0x37, VST_EFFECT_OPCODE_37 = 0x37,
/** Parameter Properties /** Parameter Properties
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
* @param p_int1 Parameter index to get properties for. * @param p_int1 Parameter index to get properties for.
* @param p_ptr Pointer to @ref vst_parameter_properties for the given parameter. * @param p_ptr Pointer to @ref vst_parameter_properties for the given parameter.
* @return @ref VST_STATUS_YES if supported, otherwise @ref VST_STATUS_NO. * @return @ref VST_STATUS_YES if supported, otherwise @ref VST_STATUS_NO.
@@ -1688,12 +1717,14 @@ enum VST_EFFECT_OPCODE {
/** /**
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
* @deprecated (VST 2.4) Invalid in all VST 2.4 and later hosts. * @deprecated (VST 2.4) Invalid in all VST 2.4 and later hosts.
*/ */
VST_EFFECT_OPCODE_39 = 0x39, VST_EFFECT_OPCODE_39 = 0x39,
/** Retrieve the VST Version supported. /** Retrieve the VST Version supported.
* *
* @important (VST 2.0+) Available from VST 2.0 onwards.
* @sa VST_VERSION * @sa VST_VERSION
* @return One of the valid enums in @ref VST_VERSION * @return One of the valid enums in @ref VST_VERSION
*/ */
@@ -1707,6 +1738,7 @@ enum VST_EFFECT_OPCODE {
/** Editor Virtual Key Down Input /** Editor Virtual Key Down Input
* *
* @important (VST 2.1+) Available from VST 2.1 onwards.
* @param p_int1 ASCII character that represents the virtual key code. * @param p_int1 ASCII character that represents the virtual key code.
* @param p_int2 Virtual Key Code * @param p_int2 Virtual Key Code
* @param p_float Modifiers being held down (bitfield) * @param p_float Modifiers being held down (bitfield)
@@ -1718,6 +1750,7 @@ enum VST_EFFECT_OPCODE {
/** Editor Virtual Key Up Event /** Editor Virtual Key Up Event
* *
* @important (VST 2.1+) Available from VST 2.1 onwards.
* @param p_int1 ASCII character that represents the virtual key code. * @param p_int1 ASCII character that represents the virtual key code.
* @param p_int2 Virtual Key Code * @param p_int2 Virtual Key Code
* @param p_float Modifiers being held down (bitfield) * @param p_float Modifiers being held down (bitfield)
@@ -1729,6 +1762,7 @@ enum VST_EFFECT_OPCODE {
/** /**
* *
* @important (VST 2.1+) Available from VST 2.1 onwards.
* @param p_int2 A value between 0 and 2. * @param p_int2 A value between 0 and 2.
*/ */
VST_EFFECT_OPCODE_3D = 0x3D, VST_EFFECT_OPCODE_3D = 0x3D,
@@ -1736,36 +1770,42 @@ enum VST_EFFECT_OPCODE {
/** /**
* *
* Midi related * Midi related
* @important (VST 2.1+) Available from VST 2.1 onwards.
*/ */
VST_EFFECT_OPCODE_3E = 0x3E, VST_EFFECT_OPCODE_3E = 0x3E,
/** /**
* *
* Midi related * Midi related
* @important (VST 2.1+) Available from VST 2.1 onwards.
*/ */
VST_EFFECT_OPCODE_3F = 0x3F, VST_EFFECT_OPCODE_3F = 0x3F,
/** /**
* *
* Midi related * Midi related
* @important (VST 2.1+) Available from VST 2.1 onwards.
*/ */
VST_EFFECT_OPCODE_40 = 0x40, VST_EFFECT_OPCODE_40 = 0x40,
/** /**
* *
* Midi related * Midi related
* @important (VST 2.1+) Available from VST 2.1 onwards.
*/ */
VST_EFFECT_OPCODE_41 = 0x41, VST_EFFECT_OPCODE_41 = 0x41,
/** /**
* *
* Midi related * Midi related
* @important (VST 2.1+) Available from VST 2.1 onwards.
*/ */
VST_EFFECT_OPCODE_42 = 0x42, VST_EFFECT_OPCODE_42 = 0x42,
/** Host is starting to set up a program. /** Host is starting to set up a program.
* Emitted prior to the host loading a program. * Emitted prior to the host loading a program.
* *
* @important (VST 2.1+) Available from VST 2.1 onwards.
* @return @ref VST_STATUS_TRUE if we understood the notification, or @ref VST_STATUS_FALSE if not. * @return @ref VST_STATUS_TRUE if we understood the notification, or @ref VST_STATUS_FALSE if not.
*/ */
VST_EFFECT_OPCODE_43 = 0x43, VST_EFFECT_OPCODE_43 = 0x43,
@@ -1775,6 +1815,7 @@ enum VST_EFFECT_OPCODE {
/** Host is done setting up a program. /** Host is done setting up a program.
* Emitted after the host finished loading a program. * Emitted after the host finished loading a program.
* *
* @important (VST 2.1+) Available from VST 2.1 onwards.
* @return @ref VST_STATUS_TRUE if we understood the notification, or @ref VST_STATUS_FALSE if not. * @return @ref VST_STATUS_TRUE if we understood the notification, or @ref VST_STATUS_FALSE if not.
*/ */
VST_EFFECT_OPCODE_43 = 0x44, VST_EFFECT_OPCODE_43 = 0x44,
@@ -1787,6 +1828,7 @@ enum VST_EFFECT_OPCODE {
/** Host wants to know the current speaker arrangement. /** Host wants to know the current speaker arrangement.
* *
* @important (VST 2.3+) Available from VST 2.3 onwards.
* @param p_int2 Pointer to @ref vst_speaker_arrangement_t for the input. * @param p_int2 Pointer to @ref vst_speaker_arrangement_t for the input.
* @param p_ptr Pointer to @ref vst_speaker_arrangement_t for the output. * @param p_ptr Pointer to @ref vst_speaker_arrangement_t for the output.
* @return @ref VST_STATUS_TRUE if we were successful, otherwise @ref VST_STATUS_FALSE. * @return @ref VST_STATUS_TRUE if we were successful, otherwise @ref VST_STATUS_FALSE.
@@ -1800,6 +1842,7 @@ enum VST_EFFECT_OPCODE {
* *
* Used in combination with @ref VST_EFFECT_CATEGORY_CONTAINER. * Used in combination with @ref VST_EFFECT_CATEGORY_CONTAINER.
* *
* @important (VST 2.3+) Available from VST 2.3 onwards.
* @param p_ptr Pointer to a char buffer of size @ref VST_BUFFER_SIZE_EFFECT_NAME to store the name of the next effect. * @param p_ptr Pointer to a char buffer of size @ref VST_BUFFER_SIZE_EFFECT_NAME to store the name of the next effect.
* @return Next effects unique_id * @return Next effects unique_id
*/ */
@@ -1810,6 +1853,7 @@ enum VST_EFFECT_OPCODE {
/** Begin processing of audio. /** Begin processing of audio.
* *
* Host is requesting that we prepare for a new section of audio separate from the previous section. * Host is requesting that we prepare for a new section of audio separate from the previous section.
* @important (VST 2.3+) Available from VST 2.3 onwards.
*/ */
VST_EFFECT_OPCODE_47 = 0x47, VST_EFFECT_OPCODE_47 = 0x47,
/** @sa VST_EFFECT_OPCODE_47 */ /** @sa VST_EFFECT_OPCODE_47 */
@@ -1818,6 +1862,7 @@ enum VST_EFFECT_OPCODE {
/** End processing of audio. /** End processing of audio.
* *
* Host is requesting that we stop processing audio and go into idle instead. * Host is requesting that we stop processing audio and go into idle instead.
* @important (VST 2.3+) Available from VST 2.3 onwards.
*/ */
VST_EFFECT_OPCODE_48 = 0x48, VST_EFFECT_OPCODE_48 = 0x48,
/** @sa VST_EFFECT_OPCODE_48 */ /** @sa VST_EFFECT_OPCODE_48 */
@@ -1826,28 +1871,35 @@ enum VST_EFFECT_OPCODE {
/** /**
* *
* *
* @important (VST 2.3+) Available from VST 2.3 onwards.
*/ */
VST_EFFECT_OPCODE_49 = 0x49, VST_EFFECT_OPCODE_49 = 0x49,
/** /**
* *
* * @important (VST 2.3+) Available from VST 2.3 onwards.
* @sa VST_EFFECT_CATEGORY_SPATIAL
* @param p_int2 Unknown meaning.
* @param p_float Unknown meaning, usually 1.0
*/ */
VST_EFFECT_OPCODE_4A = 0x4A, VST_EFFECT_OPCODE_4A = 0x4A,
/** Host wants to know if we can load the provided bank data. /** Host wants to know if we can load the provided bank data.
* Should be emitted prior to @ref VST_EFFECT_OPCODE_SET_CHUNK_DATA by the host. * Should be emitted prior to @ref VST_EFFECT_OPCODE_SET_CHUNK_DATA by the host.
* *
* @important (VST 2.3+) Available from VST 2.3 onwards.
* @param p_ptr Unknown structured data. * @param p_ptr Unknown structured data.
* @return @ref VST_STATUS_NO if we can't load the data, @ref VST_STATUS_YES if we can load the data, * @return @ref VST_STATUS_NO if we can't load the data, @ref VST_STATUS_YES if we can load the data,
* @ref VST_STATUS_UNKNOWN if this isn't supported. * @ref VST_STATUS_UNKNOWN if this isn't supported.
*
*/ */
VST_EFFECT_OPCODE_4B = 0x4B, VST_EFFECT_OPCODE_4B = 0x4B,
/** @sa VST_EFFECT_OPCODE_4B */
VST_EFFECT_OPCODE_BANK_LOAD = 0x4B,
/** Host wants to know if we can load the provided program data. /** Host wants to know if we can load the provided program data.
* Should be emitted prior to @ref VST_EFFECT_OPCODE_PROGRAM_SET_BEGIN by the host. * Should be emitted prior to @ref VST_EFFECT_OPCODE_PROGRAM_SET_BEGIN by the host.
* *
* @important (VST 2.3+) Available from VST 2.3 onwards.
* @param p_ptr Unknown structured data. * @param p_ptr Unknown structured data.
* @return @ref VST_STATUS_NO if we can't load the data, @ref VST_STATUS_YES if we can load the data, * @return @ref VST_STATUS_NO if we can't load the data, @ref VST_STATUS_YES if we can load the data,
* @ref VST_STATUS_UNKNOWN if this isn't supported. * @ref VST_STATUS_UNKNOWN if this isn't supported.
@@ -1863,18 +1915,21 @@ enum VST_EFFECT_OPCODE {
/** /**
* *
* *
* @important (VST 2.4+) Available from VST 2.4 onwards.
*/ */
VST_EFFECT_OPCODE_4D = 0x4D, VST_EFFECT_OPCODE_4D = 0x4D,
/** /**
* *
* *
* @important (VST 2.4+) Available from VST 2.4 onwards.
*/ */
VST_EFFECT_OPCODE_4E = 0x4E, VST_EFFECT_OPCODE_4E = 0x4E,
/** /**
* *
* *
* @important (VST 2.4+) Available from VST 2.4 onwards.
*/ */
VST_EFFECT_OPCODE_4F = 0x4F, VST_EFFECT_OPCODE_4F = 0x4F,
@@ -1897,7 +1952,7 @@ struct vst_effect_supports_t {
* for our delay/latency, copy inputs to outputs, and do minimal work. If we don't support it the host will not call * for our delay/latency, copy inputs to outputs, and do minimal work. If we don't support it the host will not call
* process/process_float/process_double at all while bypass is enabled. * process/process_float/process_double at all while bypass is enabled.
* *
* Note: VST 2.3 or later only. * @note VST 2.3 or later only.
* @return VST_STATUS_TRUE if we support this, otherwise VST_STATUS_FALSE. * @return VST_STATUS_TRUE if we support this, otherwise VST_STATUS_FALSE.
*/ */
const char* bypass; const char* bypass;
@@ -1999,7 +2054,7 @@ typedef float(VST_FUNCTION_INTERFACE* vst_effect_get_parameter_t)(struct vst_eff
* *
* Process input and overwrite the output in place. Host provides output buffers. * Process input and overwrite the output in place. Host provides output buffers.
* *
* Note: Not thread-safe on MacOS for some reason or another. * @note Not thread-safe on MacOS for some reason or another.
* *
* @param self Pointer to the effect itself. * @param self Pointer to the effect itself.
* @param inputs Pointer to an array of 'const float[samples]' with size numInputs. * @param inputs Pointer to an array of 'const float[samples]' with size numInputs.
@@ -2012,7 +2067,7 @@ typedef void(VST_FUNCTION_INTERFACE* vst_effect_process_float_t)(struct vst_effe
* *
* Process input and overwrite the output in place. Host provides output buffers. * Process input and overwrite the output in place. Host provides output buffers.
* *
* Note: Not present and not called prior to VST 2.4. * @note Not present and not called prior to VST 2.4.
* *
* @param self Pointer to the effect itself. * @param self Pointer to the effect itself.
* @param inputs Pointer to an array of 'const double[samples]' with size numInputs. * @param inputs Pointer to an array of 'const double[samples]' with size numInputs.
@@ -2103,8 +2158,8 @@ struct vst_effect_t {
/** Initial delay before processing of samples can actually begin in Samples. /** Initial delay before processing of samples can actually begin in Samples.
* *
* Note: The host can modify this at runtime so it is not safe. * @note The host can modify this at runtime so it is not safe.
* Note: Should be reinitialized when the effect is resumed. * @note Should be reinitialized when the effect is resumed.
* *
* @sa VST_HOST_OPCODE_IO_MODIFIED * @sa VST_HOST_OPCODE_IO_MODIFIED
*/ */
@@ -2119,7 +2174,7 @@ struct vst_effect_t {
* *
* Range: >0.0 to Infinity * Range: >0.0 to Infinity
* Default: 1.0 * Default: 1.0
* Note: Ignored in VST 2.4 or with VST_EFFECT_FLAG_SUPPORTS_FLOAT. * @note Ignored in VST 2.4 or with VST_EFFECT_FLAG_SUPPORTS_FLOAT.
*/ */
float input_output_ratio; float input_output_ratio;