AAX SDK  2.1.1
Avid Audio Extensions Development Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AAX_CHostProcessor.h
Go to the documentation of this file.
1 /*================================================================================================*/
2 /*
3  *
4  * Copyright 2013 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 Technolgy, 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 
72  virtual AAX_Result Initialize(IACFUnknown* iController);
75  virtual AAX_Result Uninitialize();
77 
120  virtual AAX_Result InitOutputBounds ( int64_t iSrcStart, int64_t iSrcEnd, int64_t * oDstStart, int64_t * oDstEnd );
121 
135  virtual AAX_Result SetLocation ( int64_t iSample );
136 
156  virtual AAX_Result RenderAudio ( const float * const iAudioIns [], int32_t iAudioInCount, float * const iAudioOuts [], int32_t iAudioOutCount, int32_t * ioWindowSize );
157 
171  virtual AAX_Result PreRender ( int32_t iAudioInCount, int32_t iAudioOutCount, int32_t iWindowSize );
172 
178  virtual AAX_Result PostRender ();
179 
194  virtual AAX_Result AnalyzeAudio ( const float * const iAudioIns [], int32_t iAudioInCount, int32_t * ioWindowSize );
195 
206  virtual AAX_Result PreAnalyze ( int32_t iAudioInCount, int32_t iWindowSize );
207 
210  virtual AAX_Result PostAnalyze ();
212 
213 
217  AAX_IEffectParameters * GetEffectParameters () { return mEffectParameters; }
218  const AAX_IEffectParameters * GetEffectParameters () const { return mEffectParameters; }
219  AAX_IHostProcessorDelegate* GetHostProcessorDelegate () { return mHostProcessingDelegate; }
220  const AAX_IHostProcessorDelegate* GetHostProcessorDelegate () const { return mHostProcessingDelegate; }
221 
230  int64_t GetLocation() const { return mLocation; }
231 
234  int64_t GetInputRange() const { return (mSrcEnd - mSrcStart); }
237  int64_t GetOutputRange() const { return (mDstEnd - mDstStart); }
241  int64_t GetSrcStart() const { return mSrcStart; }
245  int64_t GetSrcEnd() const { return mSrcEnd; }
252  int64_t GetDstStart() const { return mDstStart; }
259  int64_t GetDstEnd() const { return mDstEnd; }
261 
262 protected:
285  virtual AAX_Result TranslateOutputBounds ( int64_t iSrcStart, int64_t iSrcEnd, int64_t& oDstStart, int64_t& oDstEnd );
286 
304  virtual AAX_Result GetAudio ( const float * const iAudioIns [], int32_t iAudioInCount, int64_t iLocation, int32_t * ioNumSamples );
305 
310  virtual int32_t GetSideChainInputNum ();
311 
312  // Exterior Object Access
313  AAX_IController* Controller() { return mController; }
314  const AAX_IController* Controller() const { return mController; }
315  AAX_IHostProcessorDelegate* HostProcessorDelegate() { return mHostProcessingDelegate; }
316  const AAX_IHostProcessorDelegate* HostProcessorDelegate() const { return mHostProcessingDelegate; }
317  AAX_IEffectParameters* EffectParameters() { return mEffectParameters; }
318  const AAX_IEffectParameters* EffectParameters() const { return mEffectParameters; }
320 
321 private:
322  AAX_IController* mController;
323  AAX_IHostProcessorDelegate* mHostProcessingDelegate;
324  AAX_IEffectParameters* mEffectParameters;
325  int64_t mSrcStart;
326  int64_t mSrcEnd;
327  int64_t mDstStart;
328  int64_t mDstEnd;
329  int64_t mLocation;
330 
331 };
332 
333 
334 #endif
virtual AAX_Result InitOutputBounds(int64_t iSrcStart, int64_t iSrcEnd, int64_t *oDstStart, int64_t *oDstEnd)
Sets the processing region.
virtual AAX_Result Initialize(IACFUnknown *iController)
Host Processor initialization.
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 current selection.
Definition: AAX_CHostProcessor.h:259
virtual AAX_Result AnalyzeAudio(const float *const iAudioIns[], int32_t iAudioInCount, int32_t *ioWindowSize)
Override this method if the plug-in needs to analyze the audio prior to a Render pass.
Delegate for retrieving offline processing information from the host.
Definition: AAX_IHostProcessorDelegate.h:39
const AAX_IEffectParameters * EffectParameters() const
Definition: AAX_CHostProcessor.h:318
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.
const AAX_IEffectParameters * GetEffectParameters() const
Definition: AAX_CHostProcessor.h:218
const AAX_IController * Controller() const
Definition: AAX_CHostProcessor.h:314
int64_t GetInputRange() const
The length (in samples) of the current timeline selection.
Definition: AAX_CHostProcessor.h:234
virtual AAX_Result PostRender()
Invoked at the end of a Render pass.
Base class for the host processor interface.
Definition: AAX_IHostProcessor.h:42
int64_t GetLocation() const
The relative sample location of the current processing frame.
Definition: AAX_CHostProcessor.h:230
COM compatible IUnknown C++ interface.
Definition: AAX_ACFInterface.dox:231
Base class for the host processor interface which is extended by plugin code.
const AAX_IHostProcessorDelegate * GetHostProcessorDelegate() const
Definition: AAX_CHostProcessor.h:220
int64_t GetSrcStart() const
The sample position of the beginning of the current timeline selection, relative to the beginning cur...
Definition: AAX_CHostProcessor.h:241
virtual AAX_Result Uninitialize()
Host Processor teardown.
int32_t AAX_Result
Definition: AAX.h:118
Concrete implementation of the AAX_IHostProcessor interface for non-real-time processing.
Definition: AAX_CHostProcessor.h:57
virtual ~AAX_CHostProcessor()
const AAX_IHostProcessorDelegate * HostProcessorDelegate() const
Definition: AAX_CHostProcessor.h:316
virtual AAX_Result PreRender(int32_t iAudioInCount, int32_t iAudioOutCount, int32_t iWindowSize)
Invoked right before the start of a Preview or Render pass.
virtual AAX_Result GetAudio(const float *const iAudioIns[], int32_t iAudioInCount, int64_t iLocation, int32_t *ioNumSamples)
Randomly access audio from the timeline.
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:39
virtual AAX_Result PreAnalyze(int32_t iAudioInCount, int32_t iWindowSize)
Invoked right before the start of an Analysis pass.
virtual AAX_Result SetLocation(int64_t iSample)
Updates the relative sample location of the current processing frame.
The interface for an AAX Plug-in's data model.
Definition: AAX_IEffectParameters.h:80
AAX_IHostProcessorDelegate * HostProcessorDelegate()
Definition: AAX_CHostProcessor.h:315
virtual AAX_Result PostAnalyze()
Invoked at the end of an Analysis pass.
AAX_IEffectParameters * EffectParameters()
Definition: AAX_CHostProcessor.h:317
AAX_IEffectParameters * GetEffectParameters()
Definition: AAX_CHostProcessor.h:217
int64_t GetOutputRange() const
The length (in samples) of the clip that will be rendered to the timeline.
Definition: AAX_CHostProcessor.h:237
The interface for an AAX Plug-in's data model.
int64_t GetDstStart() const
The sample position of the beginning of the of the clip that will be rendered to the timeline...
Definition: AAX_CHostProcessor.h:252
int64_t GetSrcEnd() const
The sample position of the end of the current timeline selection, relative to the beginning of the cu...
Definition: AAX_CHostProcessor.h:245
virtual int32_t GetSideChainInputNum()
CALL: Returns the index of the side chain input buffer.
AAX_IController * Controller()
Definition: AAX_CHostProcessor.h:313
AAX_IHostProcessorDelegate * GetHostProcessorDelegate()
Definition: AAX_CHostProcessor.h:219
virtual AAX_Result RenderAudio(const float *const iAudioIns[], int32_t iAudioInCount, float *const iAudioOuts[], int32_t iAudioOutCount, int32_t *ioWindowSize)
Perform the signal processing.