LMMS
Loading...
Searching...
No Matches
vstbus.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// Project : VST SDK
3//
4// Category : Helpers
5// Filename : public.sdk/source/vst/vstbus.h
6// Created by : Steinberg, 03/2008
7// Description : VST Bus Implementation
8//
9//-----------------------------------------------------------------------------
10// LICENSE
11// (c) 2021, Steinberg Media Technologies GmbH, All Rights Reserved
12//-----------------------------------------------------------------------------
13// Redistribution and use in source and binary forms, with or without modification,
14// are permitted provided that the following conditions are met:
15//
16// * Redistributions of source code must retain the above copyright notice,
17// this list of conditions and the following disclaimer.
18// * Redistributions in binary form must reproduce the above copyright notice,
19// this list of conditions and the following disclaimer in the documentation
20// and/or other materials provided with the distribution.
21// * Neither the name of the Steinberg Media Technologies nor the names of its
22// contributors may be used to endorse or promote products derived from this
23// software without specific prior written permission.
24//
25// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
26// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
27// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28// IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
29// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
32// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
33// OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
34// OF THE POSSIBILITY OF SUCH DAMAGE.
35//-----------------------------------------------------------------------------
36
37#pragma once
38
39#include "base/source/fobject.h"
40#include "base/source/fstring.h"
43
44#include <vector>
45
46//------------------------------------------------------------------------
47namespace Steinberg {
48namespace Vst {
49
50//------------------------------------------------------------------------
54class Bus: public FObject
55{
56public:
57//------------------------------------------------------------------------
60
62 TBool isActive () const { return active; }
63
65 void setActive (TBool state) { active = state; }
66
68 void setName (String newName) { name = newName; }
69
71 void setBusType (BusType newBusType) { busType = newBusType; }
72
74 void setFlags (uint32 newFlags) { flags = newFlags; }
75
77 virtual bool getInfo (BusInfo&);
78
80//------------------------------------------------------------------------
81protected:
86};
87
88//------------------------------------------------------------------------
92class EventBus: public Bus
93{
94public:
95//------------------------------------------------------------------------
98
99 //---from Bus-------
102
104
105//------------------------------------------------------------------------
106protected:
108};
109
110//------------------------------------------------------------------------
114class AudioBus: public Bus
115{
116public:
117//------------------------------------------------------------------------
119
122
124 void setArrangement (const SpeakerArrangement& arr) { speakerArr = arr; }
125
126 //---from Bus---------------------
129
131
132//------------------------------------------------------------------------
133protected:
135};
136
137//------------------------------------------------------------------------
141class BusList: public FObject, public std::vector<IPtr<Vst::Bus> >
142{
143public:
144//------------------------------------------------------------------------
147
149 MediaType getType () const { return type; }
150
153
155
156//------------------------------------------------------------------------
157protected:
160};
161
162//------------------------------------------------------------------------
163} // namespace Vst
164} // namespace Steinberg
Definition fobject.h:82
FObject()
default constructor...
Definition fobject.h:85
Definition fstring.h:308
Definition vstbus.h:115
void setArrangement(const SpeakerArrangement &arr)
Definition vstbus.h:124
SpeakerArrangement getArrangement() const
Definition vstbus.h:121
bool getInfo(BusInfo &info) SMTG_OVERRIDE
Definition vstbus.cpp:83
AudioBus(const TChar *name, BusType busType, int32 flags, SpeakerArrangement arr)
Definition vstbus.cpp:77
SpeakerArrangement speakerArr
Definition vstbus.h:134
Definition vstbus.h:55
void setBusType(BusType newBusType)
Definition vstbus.h:71
String name
name
Definition vstbus.h:82
Bus(const TChar *name, BusType busType, int32 flags)
Definition vstbus.cpp:45
void setActive(TBool state)
Definition vstbus.h:65
void setName(String newName)
Definition vstbus.h:68
int32 flags
flags, see BusInfo::BusFlags
Definition vstbus.h:84
BusType busType
kMain or kAux, see BusTypes
Definition vstbus.h:83
TBool isActive() const
Definition vstbus.h:62
virtual bool getInfo(BusInfo &)
Definition vstbus.cpp:51
void setFlags(uint32 newFlags)
Definition vstbus.h:74
TBool active
activation state
Definition vstbus.h:85
Definition vstbus.h:142
BusDirection getDirection() const
Definition vstbus.h:152
MediaType type
Definition vstbus.h:158
BusList(MediaType type, BusDirection dir)
Definition vstbus.cpp:92
BusDirection direction
Definition vstbus.h:159
MediaType getType() const
Definition vstbus.h:149
OBJ_METHODS(Vst::BusList, FObject)
Definition vstbus.h:93
OBJ_METHODS(Vst::EventBus, Vst::Bus)
int32 channelCount
Definition vstbus.h:107
bool getInfo(BusInfo &info) SMTG_OVERRIDE
Definition vstbus.cpp:68
EventBus(const TChar *name, BusType busType, int32 flags, int32 channelCount)
Definition vstbus.cpp:62
#define OBJ_METHODS(className, baseClass)
Definition fobject.h:339
#define SMTG_OVERRIDE
Definition fplatform.h:241
struct backing_store_struct * info
Definition jmemsys.h:183
Definition ivstattributes.h:28
int32 BusType
bus type (main/aux)
Definition vsttypes.h:71
char16 TChar
UTF-16 character.
Definition vsttypes.h:62
int32 BusDirection
bus direction (in/out)
Definition vsttypes.h:70
uint64 SpeakerArrangement
Bitset of speakers.
Definition vsttypes.h:98
int32 MediaType
media type (audio/event)
Definition vsttypes.h:69
Definition baseiids.cpp:43
int int32
Definition ftypes.h:50
uint8 TBool
Definition ftypes.h:89
unsigned int uint32
Definition ftypes.h:51
Definition ivstcomponent.h:93