VST 3 Interfaces: IAudioProcessor Class Reference
Author: Steinberg

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

Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
IAudioProcessor Class Referenceabstract

Audio processing interface: Vst::IAudioProcessor. More...

`#include <ivstaudioprocessor.h>`

Inheritance diagram for IAudioProcessor:

## Public Member Functions
virtual tresult | setBusArrangements (SpeakerArrangement *inputs, int32 numIns, SpeakerArrangement *outputs, int32 numOuts)=0
| Try to set (host => plug-in) a wanted arrangement for inputs and outputs.
virtual tresult | getBusArrangement (BusDirection dir, int32 index, SpeakerArrangement &arr)=0
| Gets the bus arrangement for a given direction (input/output) and index.
virtual tresult | canProcessSampleSize (int32 symbolicSampleSize)=0
| Asks if a given sample size is supported see SymbolicSampleSizes.
virtual uint32 | getLatencySamples ()=0
| Gets the current Latency in samples.
virtual tresult | setupProcessing (ProcessSetup &setup)=0
| Called in disable state (setActive not called with true) before setProcessing is called and processing will begin.
virtual tresult | setProcessing (TBool state)=0
| Informs the plug-in about the processing state.
virtual tresult | process (ProcessData &data)=0
| The Process call, where all information (parameter changes, event, audio buffer) are passed.
virtual uint32 | getTailSamples ()=0
| Gets tail size in samples.
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 Attributes
static const FUID | iid
Static Public Attributes inherited from FUnknown
static const FUID | iid

## Detailed Description

Audio processing interface: Vst::IAudioProcessor.

- [plug imp]
- [extends IComponent]
- [released: 3.0.0]
- [mandatory]

This interface must always be supported by audio processing plug-ins.

## Member Function Documentation

## ◆ setBusArrangements()

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

Try to set (host => plug-in) a wanted arrangement for inputs and outputs.

The host should always deliver the same number of input and output busses than the plug-in needs (see getBusCount). The plug-in has 3 possibilities to react on this setBusArrangements call:

1. The plug-in accepts these arrangements, then it should modify, if needed, its busses to match these new arrangements (later on asked by the host with IComponent::getBusInfo () or IAudioProcessor::getBusArrangement ()) and then should return kResultTrue.
2. The plug-in does not accept or support these requested arrangements for all inputs/outputs or just for some or only one bus, but the plug-in can try to adapt its current arrangements according to the requested ones (requested arrangements for kMain busses should be handled with more priority than the ones for kAux busses), then it should modify its busses arrangements and should return kResultFalse.
3. Same than the point 2 above the plug-in does not support these requested arrangements but the plug-in cannot find corresponding arrangements, the plug-in could keep its current arrangement or fall back to a default arrangement by modifying its busses arrangements and should return kResultFalse.
   Parameters

     inputs | pointer to an array of SpeakerArrangement
     numIns | number of SpeakerArrangement in inputs array
     outputs | pointer to an array of SpeakerArrangement
     numOuts | number of SpeakerArrangement in outputs array Returns kResultTrue when Arrangements is supported and is the current one, else returns kResultFalse.

   Note
     [UI-thread & (Initialized | Connected | Setup Done)]

Implemented in AudioEffect, and SingleComponentEffect.

## ◆ getBusArrangement()

virtual tresult getBusArrangement | ( | BusDirection | dir,
|  | int32 | index,
|  | SpeakerArrangement & | arr )
| pure virtual

Gets the bus arrangement for a given direction (input/output) and index.

Note: IComponent::getBusInfo () and IAudioProcessor::getBusArrangement () should be always return the same information about the busses arrangements.

Note
  [UI-thread & (Initialized | Connected | Setup Done | Activated | Processing]

Implemented in AudioEffect, and SingleComponentEffect.

## ◆ canProcessSampleSize()

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

Asks if a given sample size is supported see SymbolicSampleSizes.

Note
  [UI-thread & (Initialized | Connected)]

Implemented in AudioEffect, and SingleComponentEffect.

## ◆ getLatencySamples()

virtual uint32 getLatencySamples | ( |  | ) |
| pure virtual

Gets the current Latency in samples.

The returned value defines the group delay or the latency of the plug-in. For example, if the plug-in internally needs to look in advance (like compressors) 512 samples then this plug-in should report 512 as latency. If during the use of the plug-in this latency change, the plug-in has to inform the host by using IComponentHandler::restartComponent (kLatencyChanged), this could lead to audio playback interruption because the host has to recompute its internal mixer delay compensation. Note that for player live recording this latency should be zero or small.

Note
  [UI-thread & Setup Done]

Implemented in AudioEffect, and SingleComponentEffect.

## ◆ setupProcessing()

virtual tresult setupProcessing | ( | ProcessSetup & | setup | ) |
| pure virtual

Called in disable state (setActive not called with true) before setProcessing is called and processing will begin.

Note
  [UI-thread & (Initialized | Connected)]]

Implemented in AudioEffect, and SingleComponentEffect.

## ◆ setProcessing()

virtual tresult setProcessing | ( | TBool | state | ) |
| pure virtual

Informs the plug-in about the processing state.

This will be called before any process calls start with true and after with false. Note that setProcessing (false) may be called after setProcessing (true) without any process calls. Note this function could be called in the UI or in Processing Thread, thats why the plug-in should only light operation (no memory allocation or big setup reconfiguration), this could be used to reset some buffers (like Delay line or Reverb). The host has to be sure that it is called only when the plug-in is enable (setActive (true) was called).

Note
  [(UI-thread or processing-thread) & Activated]

Implemented in AudioEffect, and SingleComponentEffect.

## ◆ process()

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

The Process call, where all information (parameter changes, event, audio buffer) are passed.

Note
  [processing-thread & Processing]

Implemented in AudioEffect, and SingleComponentEffect.

## ◆ getTailSamples()

virtual uint32 getTailSamples | ( |  | ) |
| pure virtual

Gets tail size in samples.

For example, if the plug-in is a Reverb plug-in and it knows that the maximum length of the Reverb is 2sec, then it has to return in getTailSamples () (in VST2 it was getGetTailSize ()): 2*sampleRate. This information could be used by host for offline processing, process optimization and downmix (avoiding signal cut (clicks)). It should return:

- kNoTail when no tail
- x * sampleRate when x Sec tail.
- kInfiniteTail when infinite tail.

Note
  [UI-thread & Setup Done]

Implemented in AudioEffect, and SingleComponentEffect.

## Member Data Documentation

## ◆ iid

const FUID iid
| static

Empty

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