VST 3 Examples: AGain Class Reference
Author: Steinberg

VST 3 Examples VST 3.8 SDK for developing VST plug-in

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AGain Class Reference

`#include <again.h>`

Inheritance diagram for AGain:

## Public Member Functions
| AGain ()
| ~AGain () override
tresult | initialize (FUnknown *context) SMTG_OVERRIDE
| Called at first after constructor.
tresult | terminate () SMTG_OVERRIDE
| Called at the end before destructor.
tresult | setActive (TBool state) SMTG_OVERRIDE
| Switch the plug-in on/off.
tresult | process (ProcessData &data) SMTG_OVERRIDE
| Here we go...the process call.
tresult | receiveText (const char *text) SMTG_OVERRIDE
| Test of a communication channel between controller and component.
tresult | setState (IBStream *state) SMTG_OVERRIDE
| For persistence.
tresult | getState (IBStream *state) SMTG_OVERRIDE
tresult | setupProcessing (ProcessSetup &newSetup) SMTG_OVERRIDE
| Will be called before any process call.
tresult | setBusArrangements (SpeakerArrangement *inputs, int32 numIns, SpeakerArrangement *outputs, int32 numOuts) SMTG_OVERRIDE
| Bus arrangement managing: in this example the 'again' will be mono for mono input/output and stereo for other arrangements.
tresult | canProcessSampleSize (int32 symbolicSampleSize) SMTG_OVERRIDE
| Asks if a given sample size is supported see SymbolicSampleSizes.
tresult | notify (IMessage *message) SMTG_OVERRIDE
| We want to receive message.
Public Member Functions inherited from AudioEffect
| AudioEffect ()
AudioBus * | addAudioInput (const TChar *name, SpeakerArrangement arr, BusType busType=kMain, int32 flags=BusInfo::kDefaultActive)
AudioBus * | addAudioOutput (const TChar *name, SpeakerArrangement arr, BusType busType=kMain, int32 flags=BusInfo::kDefaultActive)
AudioBus * | getAudioInput (int32 index)
AudioBus * | getAudioOutput (int32 index)
EventBus * | addEventInput (const TChar *name, int32 channels=16, BusType busType=kMain, int32 flags=BusInfo::kDefaultActive)
EventBus * | addEventOutput (const TChar *name, int32 channels=16, BusType busType=kMain, int32 flags=BusInfo::kDefaultActive)
EventBus * | getEventInput (int32 index)
EventBus * | getEventOutput (int32 index)
tresult | setBusArrangements (SpeakerArrangement *inputs, int32 numIns, SpeakerArrangement *outputs, int32 numOuts) SMTG_OVERRIDE
tresult | getBusArrangement (BusDirection dir, int32 busIndex, SpeakerArrangement &arr) SMTG_OVERRIDE
tresult | canProcessSampleSize (int32 symbolicSampleSize) SMTG_OVERRIDE
uint32 | getLatencySamples () SMTG_OVERRIDE
tresult | setupProcessing (ProcessSetup &setup) SMTG_OVERRIDE
tresult | setProcessing (TBool state) SMTG_OVERRIDE
tresult | process (ProcessData &data) SMTG_OVERRIDE
uint32 | getTailSamples () SMTG_OVERRIDE
uint32 | getProcessContextRequirements () SMTG_OVERRIDE
Public Member Functions inherited from Component
| Component ()
void | setControllerClass (const FUID &cid)
void | setControllerClass (const TUID &cid)
tresult | removeAudioBusses ()
tresult | removeEventBusses ()
tresult | renameBus (MediaType type, BusDirection dir, int32 index, const String128 newName)
tresult | getControllerClassId (TUID classID) SMTG_OVERRIDE
tresult | setIoMode (IoMode mode) SMTG_OVERRIDE
int32 | getBusCount (MediaType type, BusDirection dir) SMTG_OVERRIDE
tresult | getBusInfo (MediaType type, BusDirection dir, int32 index, BusInfo &info) SMTG_OVERRIDE
tresult | getRoutingInfo (RoutingInfo &inInfo, RoutingInfo &outInfo) SMTG_OVERRIDE
tresult | activateBus (MediaType type, BusDirection dir, int32 index, TBool state) SMTG_OVERRIDE
tresult | setActive (TBool state) SMTG_OVERRIDE
tresult | setState (IBStream *state) SMTG_OVERRIDE
tresult | getState (IBStream *state) SMTG_OVERRIDE
tresult | initialize (FUnknown *context) SMTG_OVERRIDE
tresult | terminate () SMTG_OVERRIDE
BusList * | getBusList (MediaType type, BusDirection dir)
tresult | removeAllBusses ()
Public Member Functions inherited from ComponentBase
| ComponentBase ()
| ~ComponentBase () override
FUnknown * | getHostContext () const
IConnectionPoint * | getPeer () const
IMessage * | allocateMessage () const
tresult | sendMessage (IMessage *message) const
tresult | sendTextMessage (const char8 *text) const
tresult | sendMessageID (const char8 *messageID) const
tresult | initialize (FUnknown *context) SMTG_OVERRIDE
tresult | terminate () SMTG_OVERRIDE
tresult | connect (IConnectionPoint *other) SMTG_OVERRIDE
tresult | disconnect (IConnectionPoint *other) SMTG_OVERRIDE
tresult | notify (IMessage *message) SMTG_OVERRIDE
Public Member Functions inherited from FUnknown
virtual tresult | queryInterface (const TUID _iid, void **obj)=0
virtual uint32 | addRef ()=0
virtual uint32 | release ()=0

## Static Public Member Functions
static FUnknown * | createInstance (void *)

## Protected Member Functions
template<typename SampleType>
SampleType | processAudio (SampleType **input, SampleType **output, int32 numChannels, int32 sampleFrames, float gain)
template<typename SampleType>
SampleType | processVuPPM (SampleType **input, int32 numChannels, int32 sampleFrames)

## Protected Attributes
float | fGain {1.f}
float | fGainReduction {0.f}
float | fVuPPMOld {0.f}
int32 | currentProcessMode {-1}
bool | bHalfGain {false}
bool | bBypass {false}

## Additional Inherited Members
Public Types inherited from IProcessContextRequirements
enum | Flags
Public Attributes inherited from AudioEffect
OBJ_METHODS(AudioEffect, Component) DEFINE_INTERFACES DEF_INTERFACE(IAudioProcessor) DEF_INTERFACE(IProcessContextRequirements) END_DEFINE_INTERFACES(Component) REFCOUNT_METHODS(Component) protected ProcessContextRequirements | processContextRequirements
Public Attributes inherited from Component
OBJ_METHODS(Component, ComponentBase) DEFINE_INTERFACES DEF_INTERFACE(IComponent) END_DEFINE_INTERFACES(ComponentBase) REFCOUNT_METHODS(ComponentBase) protected BusList | audioInputs
BusList | audioOutputs
BusList | eventInputs
BusList | eventOutputs
Public Attributes inherited from ComponentBase
OBJ_METHODS(ComponentBase, FObject) DEFINE_INTERFACES DEF_INTERFACE(IPluginBase) DEF_INTERFACE(IConnectionPoint) END_DEFINE_INTERFACES(FObject) REFCOUNT_METHODS(FObject) protected IPtr< IConnectionPoint > | peerConnection
Public Attributes inherited from IProcessContextRequirements
| kNeedSystemTime
| kNeedContinousTimeSamples
| kNeedProjectTimeMusic
| kNeedBarPositionMusic
| kNeedCycleMusic
| kNeedSamplesToNextClock
| kNeedTempo
| kNeedTimeSignature
| kNeedChord
| kNeedFrameRate
| kNeedTransportState
Static Public Attributes inherited from IPluginBase
static const FUID | iid
Static Public Attributes inherited from FUnknown
static const FUID | iid
Static Public Attributes inherited from IConnectionPoint
static const FUID | iid
Static Public Attributes inherited from IComponent
static const FUID | iid
Static Public Attributes inherited from IAudioProcessor
static const FUID | iid
Static Public Attributes inherited from IProcessContextRequirements
static const FUID | iid

## Constructor & Destructor Documentation

## ◆ AGain()

AGain | ( |  | ) |

## ◆ ~AGain()

~AGain | ( |  | ) |
| override

## Member Function Documentation

## ◆ createInstance()

static FUnknown * createInstance | ( | void * |  | ) |
| inlinestatic

## ◆ initialize()

tresult initialize | ( | FUnknown * | context | ) |
| virtual

Called at first after constructor.

Implements IPluginBase.

Reimplemented in AGainWithSideChain.

## ◆ terminate()

tresult terminate | ( |  | ) |
| virtual

Called at the end before destructor.

Implements IPluginBase.

## ◆ setActive()

tresult setActive | ( | TBool | state | ) |
| virtual

Switch the plug-in on/off.

Implements IComponent.

## ◆ process()

tresult process | ( | ProcessData & | data | ) |
| virtual

Here we go...the process call.

Implements IAudioProcessor.

Reimplemented in AGainWithSideChain.

## ◆ receiveText()

tresult receiveText | ( | const char * | text | ) |
| virtual

Test of a communication channel between controller and component.

Reimplemented from ComponentBase.

## ◆ setState()

tresult setState | ( | IBStream * | state | ) |
| virtual

For persistence.

Implements IComponent.

## ◆ getState()

tresult getState | ( | IBStream * | state | ) |
| virtual

Implements IComponent.

## ◆ setupProcessing()

tresult setupProcessing | ( | ProcessSetup & | newSetup | ) |
| virtual

Will be called before any process call.

Implements IAudioProcessor.

## ◆ setBusArrangements()

tresult setBusArrangements | ( | SpeakerArrangement * | inputs,
|  | int32 | numIns,
|  | SpeakerArrangement * | outputs,
|  | int32 | numOuts )
| virtual

Bus arrangement managing: in this example the 'again' will be mono for mono input/output and stereo for other arrangements.

Implements IAudioProcessor.

Reimplemented in AGainWithSideChain.

## ◆ canProcessSampleSize()

tresult canProcessSampleSize | ( | int32 | symbolicSampleSize | ) |
| virtual

Asks if a given sample size is supported see SymbolicSampleSizes.

Implements IAudioProcessor.

## ◆ notify()

tresult notify | ( | IMessage * | message | ) |
| virtual

We want to receive message.

Implements IConnectionPoint.

## ◆ processAudio()

template<typename SampleType>

SampleType processAudio | ( | SampleType ** | input,
|  | SampleType ** | output,
|  | int32 | numChannels,
|  | int32 | sampleFrames,
|  | float | gain )
| protected

## ◆ processVuPPM()

template<typename SampleType>

SampleType processVuPPM | ( | SampleType ** | input,
|  | int32 | numChannels,
|  | int32 | sampleFrames )
| protected

## Member Data Documentation

## ◆ fGain

float fGain {1.f}
| protected

## ◆ fGainReduction

float fGainReduction {0.f}
| protected

## ◆ fVuPPMOld

float fVuPPMOld {0.f}
| protected

## ◆ currentProcessMode

int32 currentProcessMode {-1}
| protected

## ◆ bHalfGain

bool bHalfGain {false}
| protected

## ◆ bBypass

bool bBypass {false}
| protected

Empty

Copyright © Steinberg Media Technologies GmbH. All Rights Reserved. This documentation is under this license.