From fbeab32e308c006a652c8940a8c0a6ab08041b03 Mon Sep 17 00:00:00 2001 From: Xaymar Date: Fri, 8 Aug 2025 04:09:12 +0200 Subject: [PATCH] Add @todo tags to anything that needs work --- vst.h | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 93 insertions(+), 9 deletions(-) diff --git a/vst.h b/vst.h index 61c6a32..9893e58 100644 --- a/vst.h +++ b/vst.h @@ -46,8 +46,11 @@ extern "C" { #define VST_FUNCTION_INTERFACE __cdecl /** Maximum number of channels/streams/inputs/outputs supported by VST 2.x + * Couldn't find any audio editing software which would attempt to add more channels. + * + * @todo Is 32 channels really the maximum? */ -#define VST_MAX_CHANNELS 32 // Couldn't find any audio editing software which would attempt to add more channels. +#define VST_MAX_CHANNELS 32 /** Convert four numbers into a FourCC */ @@ -337,6 +340,10 @@ struct vst_parameter_properties_t { // VST Input Microphones/Output Speakers //------------------------------------------------------------------------------------------------------------------------ +/** Default speaker types. + * + * @todo Are there more? + */ enum VST_SPEAKER_TYPE { // Default Types VST_SPEAKER_TYPE_MONO = 0, @@ -439,6 +446,10 @@ struct vst_speaker_properties_t { uint8_t _reserved[28]; // Reserved for future expansions? }; +/** Known default speaker arrangements. + * + * @todo There's got to be a lot more right? + */ enum VST_SPEAKER_ARRANGEMENT_TYPE { /** Custom speaker arrangement. * @@ -819,18 +830,23 @@ enum VST_HOST_OPCODE { /** @sa VST_HOST_OPCODE_03 */ VST_HOST_OPCODE_KEEPALIVE_OR_IDLE = 0x03, + /** @todo */ VST_HOST_OPCODE_04 = 0x04, //-------------------------------------------------------------------------------- // VST 2.x starts here. //-------------------------------------------------------------------------------- + /** @todo */ VST_HOST_OPCODE_05 = 0x05, + /** @todo */ VST_HOST_OPCODE_06 = 0x06, + /** @todo */ VST_HOST_OPCODE_07 = 0x07, + /** @todo */ VST_HOST_OPCODE_08 = 0x08, /** Send events from plug-in to host. @@ -852,10 +868,13 @@ enum VST_HOST_OPCODE { /** @sa VST_HOST_OPCODE_09 */ VST_HOST_OPCODE_EVENT = 0x09, + /** @todo */ VST_HOST_OPCODE_0A = 0x0A, + /** @todo */ VST_HOST_OPCODE_0B = 0x0B, + /** @todo */ VST_HOST_OPCODE_0C = 0x0C, /** Notify the host that numInputs/numOutputs/delay/numParams has changed. @@ -872,6 +891,7 @@ enum VST_HOST_OPCODE { /** @sa VST_HOST_OPCODE_0D */ VST_HOST_OPCODE_IO_MODIFIED = 0x0D, + /** @todo */ VST_HOST_OPCODE_0E = 0x0E, /** Request that the host changes the size of the containing window. @@ -935,6 +955,7 @@ enum VST_HOST_OPCODE { VST_HOST_OPCODE_15 = 0x15, + /** @todo */ VST_HOST_OPCODE_16 = 0x16, /** Which thread is the host currently processing this call from? @@ -948,18 +969,25 @@ enum VST_HOST_OPCODE { /** @sa VST_HOST_OPCODE_17 */ VST_HOST_OPCODE_GET_ACTIVE_THREAD = 0x17, + /** @todo */ VST_HOST_OPCODE_18 = 0x18, + /** @todo */ VST_HOST_OPCODE_19 = 0x19, + /** @todo */ VST_HOST_OPCODE_1A = 0x1A, + /** @todo */ VST_HOST_OPCODE_1B = 0x1B, + /** @todo */ VST_HOST_OPCODE_1C = 0x1C, + /** @todo */ VST_HOST_OPCODE_1D = 0x1D, + /** @todo */ VST_HOST_OPCODE_1E = 0x1E, /** Retrieve the hosts output speaker arrangement. @@ -1010,6 +1038,7 @@ enum VST_HOST_OPCODE { /** @sa VST_HOST_OPCODE_23 */ VST_HOST_OPCODE_CUSTOM = 0x23, + /** @todo */ VST_HOST_OPCODE_24 = 0x24, /** Check if the host supports a certain feature. @@ -1029,10 +1058,14 @@ enum VST_HOST_OPCODE { /** @sa VST_HOST_OPCODE_26 */ VST_HOST_OPCODE_LANGUAGE = 0x26, - /** Crash the host if p_ptr isn't nullptr. */ + /** Crash the host if p_ptr isn't nullptr. + * @todo + */ VST_HOST_OPCODE_27 = 0x27, - /** Crash the host if p_ptr isn't nullptr. */ + /** Crash the host if p_ptr isn't nullptr. + * @todo + */ VST_HOST_OPCODE_28 = 0x28, /** Retrieve the directory of the effect that emitted this. @@ -1088,8 +1121,23 @@ enum VST_HOST_OPCODE { /** @sa VST_HOST_OPCODE_2C */ VST_HOST_OPCODE_PARAM_UNLOCK = 0x2C, + /** Crash the host depending on what p_ptr is pointing at. + * @todo + */ VST_HOST_OPCODE_2D = 0x2D, + + //-------------------------------------------------------------------------------- + // VST 2.2 + //-------------------------------------------------------------------------------- + + /** Crash the host depending on what p_ptr is pointing at. + * @todo + */ VST_HOST_OPCODE_2E = 0x2E, + + /** Crash the host depending on what p_ptr is pointing at. + * @todo + */ VST_HOST_OPCODE_2F = 0x2F, /** @@ -1101,6 +1149,7 @@ enum VST_HOST_OPCODE { * @note (VST 2.2+) Available from VST 2.2 onwards. * @deprecated (VST 2.4+) Deprecated from VST 2.4 onwards. * @param p_ptr A pointer to something + * @todo */ VST_HOST_OPCODE_30 = 0x30, @@ -1125,10 +1174,10 @@ enum VST_HOST_OPCODE { /** @sa VST_HOST_OPCODE_31 */ VST_HOST_OPCODE_INPUT_GET_SPEAKER_ARRANGEMENT = 0x31, - // Highest number of known OPCODE. + /** @private Highest known OPCODE. */ VST_HOST_OPCODE_MAX, - // Pad to force 32-bit number. + /** @private Force as 32-bit unsigned integer in compatible compilers. */ _VST_HOST_OPCODE_PAD = 0xFFFFFFFFul, }; @@ -1661,6 +1710,7 @@ enum VST_EFFECT_OPCODE { /** * * @deprecated: (VST 2.3+) Not used in VST 2.3 or later. + * @todo */ VST_EFFECT_OPCODE_09 = 0x09, @@ -1903,6 +1953,7 @@ enum VST_EFFECT_OPCODE { * * * @note (VST 2.0+) Available from VST 2.0 onwards. + * @todo */ VST_EFFECT_OPCODE_1C = 0x1C, @@ -1910,6 +1961,7 @@ enum VST_EFFECT_OPCODE { * * @note (VST 2.0+) Available from VST 2.0 onwards. * @sa VST_EFFECT_OPCODE_05 + * @todo */ VST_EFFECT_OPCODE_1D = 0x1D, @@ -1917,6 +1969,7 @@ enum VST_EFFECT_OPCODE { * * * @note (VST 2.0+) Available from VST 2.0 onwards. + * @todo */ VST_EFFECT_OPCODE_1E = 0x1E, @@ -1924,6 +1977,7 @@ enum VST_EFFECT_OPCODE { * * * @note (VST 2.0+) Available from VST 2.0 onwards. + * @todo */ VST_EFFECT_OPCODE_1F = 0x1F, @@ -1931,6 +1985,7 @@ enum VST_EFFECT_OPCODE { * * * @note (VST 2.0+) Available from VST 2.0 onwards. + * @todo */ VST_EFFECT_OPCODE_20 = 0x20, @@ -1975,6 +2030,7 @@ enum VST_EFFECT_OPCODE { * * * @note (VST 2.0+) Available from VST 2.0 onwards. + * @todo */ VST_EFFECT_OPCODE_24 = 0x24, @@ -1982,6 +2038,7 @@ enum VST_EFFECT_OPCODE { * * * @note (VST 2.0+) Available from VST 2.0 onwards. + * @todo */ VST_EFFECT_OPCODE_25 = 0x25, @@ -1989,6 +2046,7 @@ enum VST_EFFECT_OPCODE { * * Seen in plug-ins with @ref VST_EFFECT_CATEGORY_OFFLINE. * @note (VST 2.0+) Available from VST 2.0 onwards. + * @todo */ VST_EFFECT_OPCODE_26 = 0x26, @@ -1996,6 +2054,7 @@ enum VST_EFFECT_OPCODE { * * Seen in plug-ins with @ref VST_EFFECT_CATEGORY_OFFLINE. * @note (VST 2.0+) Available from VST 2.0 onwards. + * @todo */ VST_EFFECT_OPCODE_27 = 0x27, @@ -2003,6 +2062,7 @@ enum VST_EFFECT_OPCODE { * * Seen in plug-ins with @ref VST_EFFECT_CATEGORY_OFFLINE. * @note (VST 2.0+) Available from VST 2.0 onwards. + * @todo */ VST_EFFECT_OPCODE_28 = 0x28, @@ -2010,6 +2070,7 @@ enum VST_EFFECT_OPCODE { * * Seen in plug-ins with @ref VST_EFFECT_CATEGORY_OFFLINE. * @note (VST 2.0+) Available from VST 2.0 onwards. + * @todo */ VST_EFFECT_OPCODE_29 = 0x29, @@ -2030,8 +2091,7 @@ enum VST_EFFECT_OPCODE { VST_EFFECT_OPCODE_SET_SPEAKER_ARRANGEMENT = 0x2A, /** - * - * + * @todo */ VST_EFFECT_OPCODE_2B = 0x2B, @@ -2156,6 +2216,7 @@ enum VST_EFFECT_OPCODE { * * @note (VST 2.0+) Available from VST 2.0 onwards. * @deprecated (VST 2.4) Invalid in all VST 2.4 and later hosts. + * @todo */ VST_EFFECT_OPCODE_36 = 0x36, @@ -2164,6 +2225,7 @@ enum VST_EFFECT_OPCODE { * * @note (VST 2.0+) Available from VST 2.0 onwards. * @deprecated (VST 2.4) Invalid in all VST 2.4 and later hosts. + * @todo */ VST_EFFECT_OPCODE_37 = 0x37, @@ -2184,6 +2246,7 @@ enum VST_EFFECT_OPCODE { * * @note (VST 2.0+) Available from VST 2.0 onwards. * @deprecated (VST 2.4) Invalid in all VST 2.4 and later hosts. + * @todo */ VST_EFFECT_OPCODE_39 = 0x39, @@ -2208,6 +2271,7 @@ enum VST_EFFECT_OPCODE { * @param p_int2 Virtual Key Code * @param p_float Modifiers being held down (bitfield) * @return @ref VST_STATUS_TRUE if we used the input, otherwise @ref VST_STATUS_FALSE + * @todo */ VST_EFFECT_OPCODE_3B = 0x3B, /** @sa VST_EFFECT_OPCODE_3B */ @@ -2220,6 +2284,7 @@ enum VST_EFFECT_OPCODE { * @param p_int2 Virtual Key Code * @param p_float Modifiers being held down (bitfield) * @return @ref VST_STATUS_TRUE if we used the input, otherwise @ref VST_STATUS_FALSE + * @todo */ VST_EFFECT_OPCODE_3C = 0x3C, /** @sa VST_EFFECT_OPCODE_3C */ @@ -2229,6 +2294,7 @@ enum VST_EFFECT_OPCODE { * * @note (VST 2.1+) Available from VST 2.1 onwards. * @param p_int2 A value between 0 and 2. + * @todo */ VST_EFFECT_OPCODE_3D = 0x3D, @@ -2236,6 +2302,7 @@ enum VST_EFFECT_OPCODE { * * Midi related * @note (VST 2.1+) Available from VST 2.1 onwards. + * @todo */ VST_EFFECT_OPCODE_3E = 0x3E, @@ -2243,6 +2310,7 @@ enum VST_EFFECT_OPCODE { * * Midi related * @note (VST 2.1+) Available from VST 2.1 onwards. + * @todo */ VST_EFFECT_OPCODE_3F = 0x3F, @@ -2250,6 +2318,7 @@ enum VST_EFFECT_OPCODE { * * Midi related * @note (VST 2.1+) Available from VST 2.1 onwards. + * @todo */ VST_EFFECT_OPCODE_40 = 0x40, @@ -2257,6 +2326,7 @@ enum VST_EFFECT_OPCODE { * * Midi related * @note (VST 2.1+) Available from VST 2.1 onwards. + * @todo */ VST_EFFECT_OPCODE_41 = 0x41, @@ -2264,6 +2334,7 @@ enum VST_EFFECT_OPCODE { * * Midi related * @note (VST 2.1+) Available from VST 2.1 onwards. + * @todo */ VST_EFFECT_OPCODE_42 = 0x42, @@ -2337,6 +2408,7 @@ enum VST_EFFECT_OPCODE { * * * @note (VST 2.3+) Available from VST 2.3 onwards. + * @todo */ VST_EFFECT_OPCODE_49 = 0x49, @@ -2346,6 +2418,7 @@ enum VST_EFFECT_OPCODE { * @sa VST_EFFECT_CATEGORY_SPATIAL * @param p_int2 Unknown meaning. * @param p_float Unknown meaning, usually 1.0 + * @todo */ VST_EFFECT_OPCODE_4A = 0x4A, @@ -2356,6 +2429,7 @@ enum VST_EFFECT_OPCODE { * @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, * @ref VST_STATUS_UNKNOWN if this isn't supported. + * @todo */ VST_EFFECT_OPCODE_4B = 0x4B, /** @sa VST_EFFECT_OPCODE_4B */ @@ -2368,6 +2442,7 @@ enum VST_EFFECT_OPCODE { * @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, * @ref VST_STATUS_UNKNOWN if this isn't supported. + * @todo */ VST_EFFECT_OPCODE_4C = 0x4C, /** @sa VST_EFFECT_OPCODE_4C */ @@ -2381,6 +2456,7 @@ enum VST_EFFECT_OPCODE { * * * @note (VST 2.4+) Available from VST 2.4 onwards. + * @todo */ VST_EFFECT_OPCODE_4D = 0x4D, @@ -2388,6 +2464,7 @@ enum VST_EFFECT_OPCODE { * * * @note (VST 2.4+) Available from VST 2.4 onwards. + * @todo */ VST_EFFECT_OPCODE_4E = 0x4E, @@ -2395,13 +2472,14 @@ enum VST_EFFECT_OPCODE { * * * @note (VST 2.4+) Available from VST 2.4 onwards. + * @todo */ VST_EFFECT_OPCODE_4F = 0x4F, - /** @private */ + /** @private Highest known OPCODE. */ VST_EFFECT_OPCODE_MAX, - /** @private */ + /** @private Force as 32-bit unsigned integer in compatible compilers. */ _VST_EFFECT_OPCODE_PAD = 0xFFFFFFFFul, }; @@ -2652,7 +2730,10 @@ struct vst_effect_t { */ int32_t flags; + /** @todo */ void* _unknown_00; // Must be zero when created. Reserved for host? + + /** @todo */ void* _unknown_01; // Must be zero when created. Reserved for host? /** Initial delay before processing of samples can actually begin in Samples. @@ -2664,7 +2745,10 @@ struct vst_effect_t { */ int32_t delay; + /** @todo */ int32_t _unknown_02; // Unknown int32_t values. + + /** @todo */ int32_t _unknown_03; /** Ratio of Input to Output production