LMMS
Loading...
Searching...
No Matches
vstbus.cpp
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// Project : VST SDK
3//
4// Category : Helpers
5// Filename : public.sdk/source/vst/vstbus.cpp
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#include "vstbus.h"
38
39namespace Steinberg {
40namespace Vst {
41
42//------------------------------------------------------------------------
43// Bus Implementation
44//------------------------------------------------------------------------
45Bus::Bus (const TChar* _name, BusType _busType, int32 _flags)
46: name (_name), busType (_busType), flags (_flags), active (false)
47{
48}
49
50//------------------------------------------------------------------------
52{
53 name.copyTo16 (info.name, 0, str16BufferSize (info.name) - 1);
54 info.busType = busType;
55 info.flags = flags;
56 return true;
57}
58
59//------------------------------------------------------------------------
60// EventBus Implementation
61//------------------------------------------------------------------------
66
67//------------------------------------------------------------------------
69{
70 info.channelCount = channelCount;
71 return Bus::getInfo (info);
72}
73
74//------------------------------------------------------------------------
75// AudioBus Implementation
76//------------------------------------------------------------------------
81
82//------------------------------------------------------------------------
88
89//------------------------------------------------------------------------
90// BusList Implementation
91//------------------------------------------------------------------------
95
96//------------------------------------------------------------------------
97} // namespace Vst
98} // namespace Steinberg
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
String name
name
Definition vstbus.h:82
Bus(const TChar *name, BusType busType, int32 flags)
Definition vstbus.cpp:45
int32 flags
flags, see BusInfo::BusFlags
Definition vstbus.h:84
BusType busType
kMain or kAux, see BusTypes
Definition vstbus.h:83
virtual bool getInfo(BusInfo &)
Definition vstbus.cpp:51
TBool active
activation state
Definition vstbus.h:85
MediaType type
Definition vstbus.h:158
BusList(MediaType type, BusDirection dir)
Definition vstbus.cpp:92
BusDirection direction
Definition vstbus.h:159
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 str16BufferSize(buffer)
Definition fstrdefs.h:48
int32 getChannelCount(SpeakerArrangement arr)
Definition vstspeaker.h:480
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
#define false
Definition ordinals.h:83
Definition ivstcomponent.h:93