| AAX SDK 2.8.0 Avid Audio Extensions Development Kit

- Welcome
- Manual
- Classes
- Files
- Lists
- Support

- Class List
- Class Index
- Class Hierarchy
- Class Members

Loading...
Searching...
No Matches
List of all members | Public Member Functions
AAX_CHostProcessor Class Reference
AAX SDK Manual » Additional AAX features » Offline processing interface

`#include <AAX_CHostProcessor.h>`

Inheritance diagram for AAX_CHostProcessor:
[legend]
Collaboration diagram for AAX_CHostProcessor:
[legend]

## Description

Concrete implementation of the AAX_IHostProcessor interface for non-real-time processing.

Host processor objects are used to process regions of audio data in a non-real-time context.

- Host processors must generate output samples linearly and incrementally, but may randomly access samples from the processing region on the timeline for input. See GetAudio() for more information.
- Host processors may re-define the processing region using AAX_CHostProcessor::TranslateOutputBounds().

See also
  AAX_IHostProcessorDelegate

## Public Member Functions
| AAX_CHostProcessor (void)
virtual | ~AAX_CHostProcessor ()
Initialization and uninitialization
AAX_Result | Initialize (IACFUnknown *iController) AAX_OVERRIDE
| Host Processor initialization.
AAX_Result | Uninitialize () AAX_OVERRIDE
| Host Processor teardown.
Host processor interface
AAX_Result | InitOutputBounds (int64_t iSrcStart, int64_t iSrcEnd, int64_t *oDstStart, int64_t *oDstEnd) AAX_OVERRIDE
| Sets the processing region.
AAX_Result | SetLocation (int64_t iSample) AAX_OVERRIDE
| Updates the relative sample location of the current processing frame.
AAX_Result | RenderAudio (const float *const inAudioIns[], int32_t inAudioInCount, float *const iAudioOuts[], int32_t iAudioOutCount, int32_t *ioWindowSize) AAX_OVERRIDE
| Perform the signal processing.
AAX_Result | PreRender (int32_t inAudioInCount, int32_t iAudioOutCount, int32_t iWindowSize) AAX_OVERRIDE
| Invoked right before the start of a Preview or Render pass.
AAX_Result | PostRender () AAX_OVERRIDE
| Invoked at the end of a Render pass.
AAX_Result | AnalyzeAudio (const float *const inAudioIns[], int32_t inAudioInCount, int32_t *ioWindowSize) AAX_OVERRIDE
| Override this method if the plug-in needs to analyze the audio prior to a Render pass.
AAX_Result | PreAnalyze (int32_t inAudioInCount, int32_t iWindowSize) AAX_OVERRIDE
| Invoked right before the start of an Analysis pass.
AAX_Result | PostAnalyze () AAX_OVERRIDE
| Invoked at the end of an Analysis pass.
AAX_Result | GetClipNameSuffix (int32_t inMaxLength, AAX_IString *outString) const AAX_OVERRIDE
| Called by host application to retrieve a custom string to be appended to the clip name.
Public Member Functions inherited from AAX_IHostProcessor
| ACF_DECLARE_STANDARD_UNKNOWN () ACFMETHOD(InternalQueryInterface)(const acfIID &riid
| AAX_DELETE (AAX_IHostProcessor &operator=(const AAX_IHostProcessor &))
virtual AAX_Result | GetClipNameSuffix (int32_t inMaxLength, AAX_IString *outString) const =0
| Called by host application to retrieve a custom string to be appended to the clip name.
virtual AAX_Result | Initialize (IACFUnknown *iController)=0
| Host Processor initialization.
virtual AAX_Result | Uninitialize ()=0
| Host Processor teardown.
virtual AAX_Result | InitOutputBounds (int64_t iSrcStart, int64_t iSrcEnd, int64_t *oDstStart, int64_t *oDstEnd)=0
| Sets the processing region.
virtual AAX_Result | SetLocation (int64_t iSample)=0
| Updates the relative sample location of the current processing frame.
virtual AAX_Result | RenderAudio (const float *const inAudioIns[], int32_t inAudioInCount, float *const iAudioOuts[], int32_t iAudioOutCount, int32_t *ioWindowSize)=0
| Perform the signal processing.
virtual AAX_Result | PreRender (int32_t inAudioInCount, int32_t iAudioOutCount, int32_t iWindowSize)=0
| Invoked right before the start of a Preview or Render pass.
virtual AAX_Result | PostRender ()=0
| Invoked at the end of a Render pass.
virtual AAX_Result | AnalyzeAudio (const float *const inAudioIns[], int32_t inAudioInCount, int32_t *ioWindowSize)=0
| Override this method if the plug-in needs to analyze the audio prior to a Render pass.
virtual AAX_Result | PreAnalyze (int32_t inAudioInCount, int32_t iWindowSize)=0
| Invoked right before the start of an Analysis pass.
virtual AAX_Result | PostAnalyze ()=0
| Invoked at the end of an Analysis pass.
Public Member Functions inherited from IACFUnknown
virtual BEGIN_ACFINTERFACE ACFRESULT ACFMETHODCALLTYPE | QueryInterface (const acfIID &iid, void **ppOut)=0
| Returns pointers to supported interfaces.
virtual acfUInt32 ACFMETHODCALLTYPE | AddRef (void)=0
| Increments reference count.
virtual acfUInt32 ACFMETHODCALLTYPE | Release (void)=0
| Decrements reference count.

## Convenience methods
AAX_IEffectParameters * | GetEffectParameters ()
const AAX_IEffectParameters * | GetEffectParameters () const
AAX_IHostProcessorDelegate * | GetHostProcessorDelegate ()
const AAX_IHostProcessorDelegate * | GetHostProcessorDelegate () const
int64_t | GetLocation () const
| The relative sample location of the current processing frame.
int64_t | GetInputRange () const
| The length (in samples) of the current timeline selection.
int64_t | GetOutputRange () const
| The length (in samples) of the clip that will be rendered to the timeline.
int64_t | GetSrcStart () const
| The sample position of the beginning of the current timeline selection relative to the beginning of the current input selection, i.e. 0.
int64_t | GetSrcEnd () const
| The sample position of the end of the current timeline selection relative to the beginning of the current input selection.
int64_t | GetDstStart () const
| The sample position of the beginning of the of the clip that will be rendered to the timeline relative to the beginning of the current input selection.
int64_t | GetDstEnd () const
| The sample position of the end of the of the clip that will be rendered to the timeline relative to the beginning of the current input selection.
virtual AAX_Result | TranslateOutputBounds (int64_t iSrcStart, int64_t iSrcEnd, int64_t &oDstStart, int64_t &oDstEnd)
| Define the boundaries of the clip that will be rendered to the timeline.
virtual AAX_Result | GetAudio (const float *const inAudioIns[], int32_t inAudioInCount, int64_t inLocation, int32_t *ioNumSamples)
| Randomly access audio from the timeline.
virtual int32_t | GetSideChainInputNum ()
| CALL: Returns the index of the side chain input buffer.
AAX_IController * | Controller ()
const AAX_IController * | Controller () const
AAX_IHostProcessorDelegate * | HostProcessorDelegate ()
const AAX_IHostProcessorDelegate * | HostProcessorDelegate () const
AAX_IEffectParameters * | EffectParameters ()
const AAX_IEffectParameters * | EffectParameters () const

## Additional Inherited Members
Public Attributes inherited from AAX_IHostProcessor
void **ppvObjOut | override

## Constructor & Destructor Documentation

## ◆ AAX_CHostProcessor()

AAX_CHostProcessor::AAX_CHostProcessor | ( | void |  | ) |

## ◆ ~AAX_CHostProcessor()

virtual AAX_CHostProcessor::~AAX_CHostProcessor | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ Initialize()

AAX_Result AAX_CHostProcessor::Initialize | ( | IACFUnknown * | iController | ) |
| virtual

Host Processor initialization.

Parameters

  [in] | iController | A versioned reference that can be resolved to both an AAX_IController interface and an AAX_IHostProcessorDelegate

Implements AAX_IACFHostProcessor.

## ◆ Uninitialize()

AAX_Result AAX_CHostProcessor::Uninitialize | ( |  | ) |
| virtual

Host Processor teardown.

Implements AAX_IACFHostProcessor.

## ◆ InitOutputBounds()

AAX_Result AAX_CHostProcessor::InitOutputBounds | ( | int64_t | iSrcStart,
|  | int64_t | iSrcEnd,
|  | int64_t * | oDstStart,
|  | int64_t * | oDstEnd
| ) |  |
| virtual

Sets the processing region.

This method allows offline processing plug-ins to vary the length and/or start/end points of the audio processing region.

This method is called in a few different scenarios:

- Before an analyze, process or preview of data begins.
- At the end of every preview loop.
- After the user makes a new data selection on the timeline.

Plug-ins that inherit from AAX_CHostProcessor should not override this method. Instead, use the following convenience functions:

- To retrieve the length or boundaries of the processing region, use GetInputRange(), GetSrcStart(), etc.
- To change the boundaries of the processing region before processing begins, use AAX_CHostProcessor::TranslateOutputBounds()

Note
  Currently, a host processor may not randomly access samples outside of the boundary defined by `oDstStart` and `oDstEnd`

Legacy Porting Notes:
  DAE no longer makes use of the mStartBound and mEndBounds member variables that existed in the legacy RTAS/TDM SDK. Use `oDstStart` and `oDstEnd` instead (preferably by overriding TranslateOutputBounds().)

Parameters

  [in] | iSrcStart | The selection start of the user selected region. This is will always return 0 for a given selection on the timeline.
  [in] | iSrcEnd | The selection end of the user selected region. This will always return the value of the selection length on the timeline.
  [in] | oDstStart | The starting sample location in the output audio region. By default, this is the same as `iSrcStart`.
  [in] | oDstEnd | The ending sample location in the output audio region. By default, this is the same as `iSrcEnd`.

Implements AAX_IACFHostProcessor.

## ◆ SetLocation()

AAX_Result AAX_CHostProcessor::SetLocation | ( | int64_t | iSample | ) |
| virtual

Updates the relative sample location of the current processing frame.

This method is called by the host to update the relative sample location of the current processing frame.

Note
  Plug-ins should not override this method; instead, use AAX_CHostProcessor::GetLocation() to retrieve the current relative sample location.

Parameters

  [in] | iSample | The sample location of the first sample in the current processing frame relative to the beginning of the full processing buffer

Implements AAX_IACFHostProcessor.

## ◆ RenderAudio()

AAX_Result AAX_CHostProcessor::RenderAudio | ( | const float *const | inAudioIns[],
|  | int32_t | inAudioInCount,
|  | float *const | iAudioOuts[],
|  | int32_t | iAudioOutCount,
|  | int32_t * | ioWindowSize
| ) |  |
| virtual

Perform the signal processing.

This method is called by the host to invoke the plug-in's signal processing.

Legacy Porting Notes:
  This method is a replacement for the AudioSuite `ProcessAudio` method

Parameters

  [in] | inAudioIns | Input audio buffer
  [in] | inAudioInCount | The number if input channels
  [in] | iAudioOuts | The number of output channels
  [in] | iAudioOutCount | A user defined destination end of the ingested audio
  [in] | ioWindowSize | Window buffer length of the received audio

Implements AAX_IACFHostProcessor.

## ◆ PreRender()

AAX_Result AAX_CHostProcessor::PreRender | ( | int32_t | inAudioInCount,
|  | int32_t | iAudioOutCount,
|  | int32_t | iWindowSize
| ) |  |
| virtual

Invoked right before the start of a Preview or Render pass.

This method is called by the host to allow a plug-in to make any initializations before processing actually begins. Upon a Preview pass, PreRender will also be called at the beginning of every "loop".

See also
  AAX_eProcessingState_StartPass, AAX_eProcessingState_BeginPassGroup

Parameters

  [in] | inAudioInCount | The number if input channels
  [in] | iAudioOutCount | The number of output channels
  [in] | iWindowSize | Window buffer length of the ingested audio

Implements AAX_IACFHostProcessor.

## ◆ PostRender()

AAX_Result AAX_CHostProcessor::PostRender | ( |  | ) |
| virtual

Invoked at the end of a Render pass.

Note
  Upon a Preview pass, PostRender will not be called until Preview has stopped.

See also
  AAX_eProcessingState_StopPass, AAX_eProcessingState_EndPassGroup

Implements AAX_IACFHostProcessor.

## ◆ AnalyzeAudio()

AAX_Result AAX_CHostProcessor::AnalyzeAudio | ( | const float *const | inAudioIns[],
|  | int32_t | inAudioInCount,
|  | int32_t * | ioWindowSize
| ) |  |
| virtual

Override this method if the plug-in needs to analyze the audio prior to a Render pass.

Use this after declaring the appropriate properties in Describe. See AAX_eProperty_RequiresAnalysis and AAX_eProperty_OptionalAnalysis

To request an analysis pass from within a plug-in, use AAX_IHostProcessorDelegate::ForceAnalyze()

Legacy Porting Notes:
  Ported from AudioSuite's `AnalyzeAudio`(bool `isMasterBypassed`) method

Parameters

  [in] | inAudioIns | Input audio buffer
  [in] | inAudioInCount | The number of input channels
  [in] | ioWindowSize | Window buffer length of the ingested audio

Implements AAX_IACFHostProcessor.

## ◆ PreAnalyze()

AAX_Result AAX_CHostProcessor::PreAnalyze | ( | int32_t | inAudioInCount,
|  | int32_t | iWindowSize
| ) |  |
| virtual

Invoked right before the start of an Analysis pass.

This method is called by the host to allow a plug-in to make any initializations before an Analysis pass actually begins.

See also
  AAX_eProcessingState_StartPass, AAX_eProcessingState_BeginPassGroup

Parameters

  [in] | inAudioInCount | The number if input channels
  [in] | iWindowSize | Window buffer length of the ingested audio

Implements AAX_IACFHostProcessor.

## ◆ PostAnalyze()

AAX_Result AAX_CHostProcessor::PostAnalyze | ( |  | ) |
| virtual

Invoked at the end of an Analysis pass.

Note
  In Pro Tools, a long execution time for this method will hold off the main application thread and cause a visible hang. If the plug-in must perform any long running tasks before initiating processing then it is best to perform these tasks in AAX_IHostProcessor::PreRender()

See also
  AAX_eProcessingState_StopPass, AAX_eProcessingState_EndPassGroup

Implements AAX_IACFHostProcessor.

## ◆ GetClipNameSuffix()

AAX_Result AAX_CHostProcessor::GetClipNameSuffix | ( | int32_t | inMaxLength,
|  | AAX_IString * | outString
| ) |  | const
| virtual

Called by host application to retrieve a custom string to be appended to the clip name.

If no string is provided then the host's default will be used.

Parameters

  [in] | inMaxLength | The maximum allowed string length, not including the NULL terminating char
  [out] | outString | Add a value to this string to provide a custom clip suffix

Implements AAX_IACFHostProcessor_V2.

## ◆ GetEffectParameters() [1/2]

AAX_IEffectParameters * AAX_CHostProcessor::GetEffectParameters | ( |  | ) |
| inline

## ◆ GetEffectParameters() [2/2]

const AAX_IEffectParameters * AAX_CHostProcessor::GetEffectParameters | ( |  | ) | const
| inline

## ◆ GetHostProcessorDelegate() [1/2]

AAX_IHostProcessorDelegate * AAX_CHostProcessor::GetHostProcessorDelegate | ( |  | ) |
| inline

## ◆ GetHostProcessorDelegate() [2/2]

const AAX_IHostProcessorDelegate * AAX_CHostProcessor::GetHostProcessorDelegate | ( |  | ) | const
| inline

## ◆ GetLocation()

int64_t AAX_CHostProcessor::GetLocation | ( |  | ) | const
| inline

The relative sample location of the current processing frame.

This method returns the relative sample location for the current RenderAudio() processing frame. For example, if a value of 10 is provided for the RenderAudio() `ioWindow` parameter, then calls to this method from within each execution of RenderAudio() will return 0, 10, 20,...

## ◆ GetInputRange()

int64_t AAX_CHostProcessor::GetInputRange | ( |  | ) | const
| inline

The length (in samples) of the current timeline selection.

## ◆ GetOutputRange()

int64_t AAX_CHostProcessor::GetOutputRange | ( |  | ) | const
| inline

The length (in samples) of the clip that will be rendered to the timeline.

## ◆ GetSrcStart()

int64_t AAX_CHostProcessor::GetSrcStart | ( |  | ) | const
| inline

The sample position of the beginning of the current timeline selection relative to the beginning of the current input selection, i.e. 0.

## ◆ GetSrcEnd()

int64_t AAX_CHostProcessor::GetSrcEnd | ( |  | ) | const
| inline

The sample position of the end of the current timeline selection relative to the beginning of the current input selection.

## ◆ GetDstStart()

int64_t AAX_CHostProcessor::GetDstStart | ( |  | ) | const
| inline

The sample position of the beginning of the of the clip that will be rendered to the timeline relative to the beginning of the current input selection.

This value will be equal to the value returned by GetSrcStart() unless the selection boundaries have been modified by overriding TranslateOutputBounds()

## ◆ GetDstEnd()

int64_t AAX_CHostProcessor::GetDstEnd | ( |  | ) | const
| inline

The sample position of the end of the of the clip that will be rendered to the timeline relative to the beginning of the current input selection.

This value will be equal to the value returned by GetSrcStart() unless the selection boundaries have been modified by overriding TranslateOutputBounds()

## ◆ TranslateOutputBounds()

virtual AAX_Result AAX_CHostProcessor::TranslateOutputBounds | ( | int64_t | iSrcStart,
|  | int64_t | iSrcEnd,
|  | int64_t & | oDstStart,
|  | int64_t & | oDstEnd
| ) |  |
| protected virtual

Define the boundaries of the clip that will be rendered to the timeline.

This method is called from AAX_CHostProcessor::InitOutputBounds(), providing a convenient hook for re-defining the processing region boundaries. See InitOutputBounds() for more information.

Parameters

  [in] | iSrcStart | The selection start of the user selected region. This is will always return 0 for a given selection on the timeline.
  [in] | iSrcEnd | The selection end of the user selected region. This will always return the value of the selection length on the timeline.
  [in] | oDstStart | The starting sample location in the output audio region. By default, this is the same as `iSrcStart`.
  [in] | oDstEnd | The ending sample location in the output audio region. By default, this is the same as `iSrcEnd`.

## ◆ GetAudio()

virtual AAX_Result AAX_CHostProcessor::GetAudio | ( | const float *const | inAudioIns[],
|  | int32_t | inAudioInCount,
|  | int64_t | inLocation,
|  | int32_t * | ioNumSamples
| ) |  |
| protected virtual

Randomly access audio from the timeline.

This is a convenience wrapper around AAX_IHostProcessorDelegate::GetAudio().

Parameters

  [in] | inAudioIns | Timeline audio buffer(s). This must be set to `inAudioIns` from AAX_IHostProcessor::RenderAudio()
  [in] | inAudioInCount | Number of buffers in `inAudioIns`. This must be set to `inAudioInCount` from AAX_IHostProcessor::RenderAudio()
  [in] | inLocation | A sample location relative to the beginning of the currently processed region, e.g. a value of 0 corresponds to the timeline location returned by AAX_CHostProcessor::GetSrcStart()
  [in,out] | ioNumSamples | Input: The maximum number of samples to read. Output: The actual number of samples that were read from the timeline

## ◆ GetSideChainInputNum()

virtual int32_t AAX_CHostProcessor::GetSideChainInputNum | ( |  | ) |
| protected virtual

CALL: Returns the index of the side chain input buffer.

This is a convenience wrapper around AAX_IHostProcessorDelegate::GetSideChainInputNum()

## ◆ Controller() [1/2]

AAX_IController * AAX_CHostProcessor::Controller | ( |  | ) |
| inline protected

## ◆ Controller() [2/2]

const AAX_IController * AAX_CHostProcessor::Controller | ( |  | ) | const
| inline protected

## ◆ HostProcessorDelegate() [1/2]

AAX_IHostProcessorDelegate * AAX_CHostProcessor::HostProcessorDelegate | ( |  | ) |
| inline protected

## ◆ HostProcessorDelegate() [2/2]

const AAX_IHostProcessorDelegate * AAX_CHostProcessor::HostProcessorDelegate | ( |  | ) | const
| inline protected

## ◆ EffectParameters() [1/2]

AAX_IEffectParameters * AAX_CHostProcessor::EffectParameters | ( |  | ) |
| inline protected

## ◆ EffectParameters() [2/2]

const AAX_IEffectParameters * AAX_CHostProcessor::EffectParameters | ( |  | ) | const
| inline protected

The documentation for this class was generated from the following file:

- AAX_CHostProcessor.h