vst2sdk

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

vstspeaker.h (3351B)


      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 #include "vsttypes.h"
     18 
     19 #pragma pack(push, 8)
     20 
     21 enum VstSpeakerArrangmentType { // Name adapted from vst.h
     22 	kSpeakerArrUserDefined = -2,
     23 	kSpeakerArr__unk01     = -1,
     24 	// Taken from: VstInt32 Vst2Wrapper::vst3ToVst2SpeakerArr
     25 	kSpeakerArrMono = 0,
     26 	kSpeakerArrStereo,
     27 	kSpeakerArrStereoSurround,
     28 	kSpeakerArrStereoCenter,
     29 	kSpeakerArrStereoSide,
     30 	kSpeakerArrStereoCLfe,
     31 	kSpeakerArr30Cine,
     32 	kSpeakerArr30Music,
     33 	kSpeakerArr31Cine,
     34 	kSpeakerArr31Music,
     35 	kSpeakerArr40Cine,
     36 	kSpeakerArr40Music,
     37 	kSpeakerArr41Cine,
     38 	kSpeakerArr41Music,
     39 	kSpeakerArr50,
     40 	kSpeakerArr51,
     41 	kSpeakerArr60Cine,
     42 	kSpeakerArr60Music,
     43 	kSpeakerArr61Cine,
     44 	kSpeakerArr61Music,
     45 	kSpeakerArr70Cine,
     46 	kSpeakerArr70Music,
     47 	kSpeakerArr71Cine,
     48 	kSpeakerArr71Music,
     49 	kSpeakerArr80Cine,
     50 	kSpeakerArr80Music,
     51 	kSpeakerArr81Cine,
     52 	kSpeakerArr81Music,
     53 	kSpeakerArr102,
     54 };
     55 
     56 enum VstSpeakerType { // Name adapted from vst.h
     57 	// Taken from VstInt32 Vst2Wrapper::vst3ToVst2Speaker (Vst::Speaker vst3Speaker)
     58 	kSpeakerUndefined = INT32_MAX, // Weirdest one to figure out. Why not -1?
     59 	kSpeakerM         = 0,
     60 	kSpeakerL,
     61 	kSpeakerR,
     62 	kSpeakerC,
     63 	kSpeakerLfe,
     64 	kSpeakerLs,
     65 	kSpeakerRs,
     66 	kSpeakerLc,
     67 	kSpeakerRc,
     68 	kSpeakerS,
     69 	kSpeakerSl,
     70 	kSpeakerSr,
     71 	kSpeakerTm,
     72 	kSpeakerTfl,
     73 	kSpeakerTfc,
     74 	kSpeakerTfr,
     75 	kSpeakerTrl,
     76 	kSpeakerTrc,
     77 	kSpeakerTrr,
     78 	kSpeakerLfe2,
     79 };
     80 
     81 struct VstSpeakerProperties {
     82 	float    __unk00;
     83 	float    __unk01;
     84 	float    __unk02;
     85 	float    __unk03;
     86 	char     name[64];
     87 	VstInt32 type; // VstSpeakerType, see vst.h
     88 	char     __unk04[28];
     89 };
     90 
     91 struct VstSpeakerArrangement {
     92 	VstInt32             type; // VstSpeakerArrangmentType, see vst.h
     93 	VstInt32             numChannels;
     94 	VstSpeakerProperties speakers[32]; // See vst.h. I don't know if this size is correct.
     95 };
     96 
     97 #pragma pack(pop)