vst2sdk

A clean room reverse engineering project for the VST 2.x interface
Log | Files | Refs | README | LICENSE

vsttypes.h (2410B)


      1 /*
      2  * Copyright 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
      3  * Copyright 2024 Steinberg Media Technologies GmbH
      4  *
      5  * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
      6  *
      7  * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
      8  *
      9  * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
     10  *
     11  * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
     12  *
     13  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     14  */
     15 
     16 #pragma once
     17 #ifdef __cplusplus
     18 #include <cinttypes>
     19 #else
     20 #include <inttypes.h>
     21 #endif
     22 
     23 #define VstFunctionAPI __cdecl
     24 
     25 enum VstMaxLengths { // Anything with k is an enum?
     26 	kVstMaxNameLen        = 64,
     27 	kVstMaxLabelLen       = 64,
     28 	kVstMaxShortLabelLen  = 8,
     29 	kVstExtMaxParamStrLen = 32, // Apparently incorrect, but actually in use by many hosts.
     30 	kVstMaxParamStrLen    = 8,
     31 	kVstMaxProgNameLen    = 24,
     32 	kVstMaxVendorStrLen   = 64,
     33 	kVstMaxEffectNameLen  = 32,
     34 };
     35 
     36 // 16-bit wide Integer
     37 typedef int16_t VstInt16;
     38 
     39 // 32-bit wide Integer
     40 typedef int32_t VstInt32;
     41 
     42 // Variable size Integer Pointer
     43 typedef intptr_t VstIntPtr;
     44 
     45 // Float and double are used as-is. No custom type name here.
     46 
     47 // Bus Direction. Appears to be int32_t
     48 typedef int32_t BusDirection;
     49 
     50 // Rectangle
     51 struct ERect {
     52 	VstInt16 left, top, right, bottom;
     53 };