AAX SDK  2.4.1
Avid Audio Extensions Development Kit
AAX_CHostProcessor.h
Go to the documentation of this file.
1 /*================================================================================================*/
2 /*
3  *
4  * Copyright 2013-2017, 2019 by Avid Technology, Inc.
5  * All rights reserved.
6  *
7  * CONFIDENTIAL: This document contains confidential information. Do not
8  * read or examine this document unless you are an Avid Technology employee
9  * or have signed a non-disclosure agreement with Avid Technology which protects
10  * the confidentiality of this document. DO NOT DISCLOSE ANY INFORMATION
11  * CONTAINED IN THIS DOCUMENT TO ANY THIRD-PARTY WITHOUT THE PRIOR WRITTEN CONSENT
12  * OF Avid Technology, INC.
13  *
14  */
15 
22 /*================================================================================================*/
23 
24 
25 #ifndef AAX_CHOSTPROCESSOR_H
26 #define AAX_CHOSTPROCESSOR_H
27 
28 #include "AAX_IEffectParameters.h"
29 #include "AAX_IHostProcessor.h"
30 #include "ACFPtr.h"
31 
32 
34 class AAX_IController;
36 class IACFUnknown;
37 
58 {
59 public:
60  /* default constructor */ AAX_CHostProcessor (void);
61  virtual /* destructor */ ~AAX_CHostProcessor ();
62 
77 
120  AAX_Result InitOutputBounds ( int64_t iSrcStart, int64_t iSrcEnd, int64_t * oDstStart, int64_t * oDstEnd ) AAX_OVERRIDE;
121 
135  AAX_Result SetLocation ( int64_t iSample ) AAX_OVERRIDE;
136 
156  AAX_Result RenderAudio ( const float * const inAudioIns [], int32_t inAudioInCount, float * const iAudioOuts [], int32_t iAudioOutCount, int32_t * ioWindowSize ) AAX_OVERRIDE;
157 
173  AAX_Result PreRender ( int32_t inAudioInCount, int32_t iAudioOutCount, int32_t iWindowSize ) AAX_OVERRIDE;
174 
183 
201  AAX_Result AnalyzeAudio ( const float * const inAudioIns [], int32_t inAudioInCount, int32_t * ioWindowSize ) AAX_OVERRIDE;
202 
215  AAX_Result PreAnalyze ( int32_t inAudioInCount, int32_t iWindowSize ) AAX_OVERRIDE;
216 
239  AAX_Result GetClipNameSuffix ( int32_t inMaxLength, AAX_IString* outString ) const AAX_OVERRIDE;
241 
242 
246  AAX_IEffectParameters * GetEffectParameters () { return mEffectParameters; }
247  const AAX_IEffectParameters * GetEffectParameters () const { return mEffectParameters; }
248  AAX_IHostProcessorDelegate* GetHostProcessorDelegate () { return mHostProcessingDelegate; }
249  const AAX_IHostProcessorDelegate* GetHostProcessorDelegate () const { return mHostProcessingDelegate; }
250 
259  int64_t GetLocation() const { return mLocation; }
260 
263  int64_t GetInputRange() const { return (mSrcEnd - mSrcStart); }
266  int64_t GetOutputRange() const { return (mDstEnd - mDstStart); }
270  int64_t GetSrcStart() const { return mSrcStart; }
274  int64_t GetSrcEnd() const { return mSrcEnd; }
281  int64_t GetDstStart() const { return mDstStart; }
288  int64_t GetDstEnd() const { return mDstEnd; }
290 
291 protected:
314  virtual AAX_Result TranslateOutputBounds ( int64_t iSrcStart, int64_t iSrcEnd, int64_t& oDstStart, int64_t& oDstEnd );
315 
333  virtual AAX_Result GetAudio ( const float * const inAudioIns [], int32_t inAudioInCount, int64_t inLocation, int32_t * ioNumSamples );
334 
339  virtual int32_t GetSideChainInputNum ();
340 
341  // Exterior Object Access
342  AAX_IController* Controller() { return mController; }
343  const AAX_IController* Controller() const { return mController; }
344  AAX_IHostProcessorDelegate* HostProcessorDelegate() { return mHostProcessingDelegate; }
345  const AAX_IHostProcessorDelegate* HostProcessorDelegate() const { return mHostProcessingDelegate; }
346  AAX_IEffectParameters* EffectParameters() { return mEffectParameters; }
347  const AAX_IEffectParameters* EffectParameters() const { return mEffectParameters; }
349 
350 private:
351  AAX_IController* mController;
352  AAX_IHostProcessorDelegate* mHostProcessingDelegate;
353  AAX_IEffectParameters* mEffectParameters;
354  int64_t mSrcStart;
355  int64_t mSrcEnd;
356  int64_t mDstStart;
357  int64_t mDstEnd;
358  int64_t mLocation;
359 
360 };
361 
362 
363 #endif
int32_t AAX_Result
Definition: AAX.h:337
#define AAX_OVERRIDE
override keyword macro
Definition: AAX.h:141
The interface for an AAX Plug-in's data model.
Base class for the host processor interface which is extended by plugin code.
COM compatible IUnknown C++ interface.
Definition: AAX_ACFInterface.doxygen:248
Concrete implementation of the AAX_IHostProcessor interface for non-real-time processing.
Definition: AAX_CHostProcessor.h:58
AAX_Result Uninitialize() AAX_OVERRIDE
Host Processor teardown.
const AAX_IController * Controller() const
Definition: AAX_CHostProcessor.h:343
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.
int64_t GetDstEnd() const
The sample position of the end of the of the clip that will be rendered to the timeline relative to t...
Definition: AAX_CHostProcessor.h:288
virtual ~AAX_CHostProcessor()
int64_t GetInputRange() const
The length (in samples) of the current timeline selection.
Definition: AAX_CHostProcessor.h:263
AAX_Result PreAnalyze(int32_t inAudioInCount, int32_t iWindowSize) AAX_OVERRIDE
Invoked right before the start of an Analysis 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 PostRender() AAX_OVERRIDE
Invoked at the end of a Render pass.
AAX_Result SetLocation(int64_t iSample) AAX_OVERRIDE
Updates the relative sample location of the current processing frame.
virtual AAX_Result GetAudio(const float *const inAudioIns[], int32_t inAudioInCount, int64_t inLocation, int32_t *ioNumSamples)
Randomly access audio from the timeline.
int64_t GetSrcEnd() const
The sample position of the end of the current timeline selection relative to the beginning of the cur...
Definition: AAX_CHostProcessor.h:274
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 int32_t GetSideChainInputNum()
CALL: Returns the index of the side chain input buffer.
const AAX_IEffectParameters * EffectParameters() const
Definition: AAX_CHostProcessor.h:347
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.
AAX_Result InitOutputBounds(int64_t iSrcStart, int64_t iSrcEnd, int64_t *oDstStart, int64_t *oDstEnd) AAX_OVERRIDE
Sets the processing region.
AAX_IHostProcessorDelegate * HostProcessorDelegate()
Definition: AAX_CHostProcessor.h:344
int64_t GetLocation() const
The relative sample location of the current processing frame.
Definition: AAX_CHostProcessor.h:259
int64_t GetOutputRange() const
The length (in samples) of the clip that will be rendered to the timeline.
Definition: AAX_CHostProcessor.h:266
const AAX_IHostProcessorDelegate * HostProcessorDelegate() const
Definition: AAX_CHostProcessor.h:345
AAX_IEffectParameters * EffectParameters()
Definition: AAX_CHostProcessor.h:346
const AAX_IHostProcessorDelegate * GetHostProcessorDelegate() const
Definition: AAX_CHostProcessor.h:249
AAX_IController * Controller()
Definition: AAX_CHostProcessor.h:342
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_IEffectParameters * GetEffectParameters()
Definition: AAX_CHostProcessor.h:246
int64_t GetDstStart() const
The sample position of the beginning of the of the clip that will be rendered to the timeline relativ...
Definition: AAX_CHostProcessor.h:281
int64_t GetSrcStart() const
The sample position of the beginning of the current timeline selection relative to the beginning of t...
Definition: AAX_CHostProcessor.h:270
const AAX_IEffectParameters * GetEffectParameters() const
Definition: AAX_CHostProcessor.h:247
AAX_Result Initialize(IACFUnknown *iController) AAX_OVERRIDE
Host Processor initialization.
AAX_Result PostAnalyze() AAX_OVERRIDE
Invoked at the end of an Analysis pass.
AAX_IHostProcessorDelegate * GetHostProcessorDelegate()
Definition: AAX_CHostProcessor.h:248
Interface for the AAX host's view of a single instance of an effect. Used by both clients of the AAX ...
Definition: AAX_IController.h:44
The interface for an AAX Plug-in's data model.
Definition: AAX_IEffectParameters.h:83
Base class for the host processor interface.
Definition: AAX_IHostProcessor.h:45
Versioned interface for host methods specific to offline processing.
Definition: AAX_IHostProcessorDelegate.h:41
A simple string container that can be passed across a binary boundary. This class,...
Definition: AAX_IString.h:41