AAX SDK  2.4.1
Avid Audio Extensions Development Kit
AAX_IComponentDescriptor.h
Go to the documentation of this file.
1 /*================================================================================================*/
2 /*
3  *
4  * Copyright 2013-2017 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_ICOMPONENTDESCRIPTOR_H_
26 #define _AAX_ICOMPONENTDESCRIPTOR_H_
27 
28 #include "AAX.h"
29 #include "AAX_IDma.h"
30 #include "AAX_Callbacks.h"
31 
32 class AAX_IPropertyMap;
33 
34 
47 {
48 public:
50 
57  virtual AAX_Result Clear () = 0;
58 
71  virtual AAX_Result AddAudioIn ( AAX_CFieldIndex inFieldIndex ) = 0;
72 
85  virtual AAX_Result AddAudioOut ( AAX_CFieldIndex inFieldIndex ) = 0;
86 
99  virtual AAX_Result AddAudioBufferLength ( AAX_CFieldIndex inFieldIndex ) = 0;
100 
113  virtual AAX_Result AddSampleRate ( AAX_CFieldIndex inFieldIndex ) = 0;
114 
132  virtual AAX_Result AddClock ( AAX_CFieldIndex inFieldIndex ) = 0;
133 
147  virtual AAX_Result AddSideChainIn ( AAX_CFieldIndex inFieldIndex ) = 0;
148 
171  virtual AAX_Result AddDataInPort ( AAX_CFieldIndex inFieldIndex, uint32_t inPacketSize, AAX_EDataInPortType inPortType = AAX_eDataInPortType_Buffered ) = 0;
172 
208  virtual AAX_Result AddAuxOutputStem ( AAX_CFieldIndex inFieldIndex, int32_t inStemFormat, const char inNameUTF8[]) = 0;
225  virtual AAX_Result AddPrivateData ( AAX_CFieldIndex inFieldIndex, int32_t inDataSize, /* AAX_EPrivateDataOptions */ uint32_t inOptions = AAX_ePrivateDataOptions_DefaultOptions ) = 0;
226 
241  virtual AAX_Result AddTemporaryData( AAX_CFieldIndex inFieldIndex, uint32_t inDataElementSize) = 0;
242 
263  virtual AAX_Result AddDmaInstance ( AAX_CFieldIndex inFieldIndex, AAX_IDma::EMode inDmaMode ) = 0;
264 
280  virtual AAX_Result AddMeters ( AAX_CFieldIndex inFieldIndex, const AAX_CTypeID* inMeterIDs, const uint32_t inMeterCount ) = 0;
281 
304  virtual AAX_Result AddMIDINode ( AAX_CFieldIndex inFieldIndex, AAX_EMIDINodeType inNodeType, const char inNodeName[], uint32_t channelMask ) = 0;
305 
316  virtual AAX_Result AddReservedField ( AAX_CFieldIndex inFieldIndex, uint32_t inFieldType ) = 0;
317 
325  virtual AAX_IPropertyMap * NewPropertyMap () const = 0; // CONST?
326 
337  virtual AAX_IPropertyMap * DuplicatePropertyMap (AAX_IPropertyMap* inPropertyMap) const = 0;
358  AAX_CProcessProc inProcessProc,
359  AAX_IPropertyMap * inProperties = NULL,
360  AAX_CInstanceInitProc inInstanceInitProc = NULL,
361  AAX_CBackgroundProc inBackgroundProc = NULL,
362  AAX_CSelector * outProcID = NULL) = 0;
387  const char inDLLFileNameUTF8 [],
388  const char inProcessProcSymbol [],
389  AAX_IPropertyMap * inProperties,
390  const char inInstanceInitProcSymbol [] = NULL,
391  const char inBackgroundProcSymbol [] = NULL,
392  AAX_CSelector * outProcID = NULL) = 0;
393 
440  AAX_IPropertyMap* inProperties,
441  AAX_CSelector* outProcIDs = NULL,
442  int32_t inProcIDsSize = 0) = 0;
443 
457  template <typename aContextType>
459  void (AAX_CALLBACK *inProcessProc) ( aContextType * const inInstancesBegin [], const void * inInstancesEnd),
460  AAX_IPropertyMap * inProperties = NULL,
461  int32_t (AAX_CALLBACK *inInstanceInitProc) ( const aContextType * inInstanceContextPtr, AAX_EComponentInstanceInitAction inAction ) = NULL,
462  int32_t (AAX_CALLBACK *inBackgroundProc) ( void ) = NULL );
463 };
464 
465 template <typename aContextType>
466 inline AAX_Result
468  void (AAX_CALLBACK *inProcessProc) ( aContextType * const inInstancesBegin [], const void * inInstancesEnd),
469  AAX_IPropertyMap * inProperties,
470  int32_t (AAX_CALLBACK *inInstanceInitProc) ( const aContextType * inInstanceContextPtr, AAX_EComponentInstanceInitAction inAction ),
471  int32_t (AAX_CALLBACK *inBackgroundProc) ( void ) )
472 {
473  return this->AddProcessProc_Native(
474  reinterpret_cast <AAX_CProcessProc>( inProcessProc ),
475  inProperties,
476  reinterpret_cast<AAX_CInstanceInitProc>( inInstanceInitProc ),
477  reinterpret_cast<AAX_CBackgroundProc>( inBackgroundProc ) );
478 }
479 
480 #endif // #ifndef _AAX_ICOMPONENTDESCRIPTOR_H_
Various utility definitions for AAX.
int32_t AAX_Result
Definition: AAX.h:337
#define AAX_CALLBACK
Definition: AAX.h:285
uint32_t AAX_CTypeID
Matches type of OSType used in classic plugins.
Definition: AAX.h:336
AAX_CIndex AAX_CFieldIndex
Not used by AAX plug-ins (except in AAX_FIELD_INDEX macro)
Definition: AAX.h:349
uint32_t AAX_CSelector
Definition: AAX.h:330
AAX callback prototypes and ProcPtr definitions
AAX_Component< void >::CInstanceInitProc AAX_CInstanceInitProc
A user-defined callback that AAX calls to notify the component that an instance is being added or rem...
Definition: AAX_Callbacks.h:138
AAX_Component< void >::CBackgroundProc AAX_CBackgroundProc
A user-defined callback that AAX calls in the AAX Idle time.
Definition: AAX_Callbacks.h:149
AAX_Component< void >::CProcessProc AAX_CProcessProc
A user-defined callback that AAX calls to process data packets and/or audio.
Definition: AAX_Callbacks.h:102
AAX_EMIDINodeType
MIDI node types.
Definition: AAX_Enums.h:961
@ AAX_ePrivateDataOptions_DefaultOptions
Definition: AAX_Enums.h:737
AAX_EDataInPortType
Property value for whether a data in port should be buffered or not.
Definition: AAX_Enums.h:1042
@ AAX_eDataInPortType_Buffered
Definition: AAX_Enums.h:1052
AAX_EComponentInstanceInitAction
Selector indicating the action that occurred to prompt a component initialization callback.
Definition: AAX_Enums.h:795
Cross-platform interface for access to the host's direct memory access (DMA) facilities.
Description interface for an AAX plug-in component.
Definition: AAX_IComponentDescriptor.h:47
virtual AAX_Result Clear()=0
Clears the descriptor.
virtual AAX_IPropertyMap * NewPropertyMap() const =0
Creates a new, empty property map.
virtual AAX_Result AddProcessProc(AAX_IPropertyMap *inProperties, AAX_CSelector *outProcIDs=NULL, int32_t inProcIDsSize=0)=0
Registers one or more algorithm processing entrypoints (process procedures)
virtual AAX_IPropertyMap * DuplicatePropertyMap(AAX_IPropertyMap *inPropertyMap) const =0
Creates a new property map using an existing property map.
virtual AAX_Result AddPrivateData(AAX_CFieldIndex inFieldIndex, int32_t inDataSize, uint32_t inOptions=AAX_ePrivateDataOptions_DefaultOptions)=0
Adds a private data port to the algorithm context.
virtual ~AAX_IComponentDescriptor()
Definition: AAX_IComponentDescriptor.h:49
virtual AAX_Result AddProcessProc_Native(AAX_CProcessProc inProcessProc, AAX_IPropertyMap *inProperties=NULL, AAX_CInstanceInitProc inInstanceInitProc=NULL, AAX_CBackgroundProc inBackgroundProc=NULL, AAX_CSelector *outProcID=NULL)=0
Registers an algorithm processing entrypoint (process procedure) for the native architecture.
virtual AAX_Result AddSideChainIn(AAX_CFieldIndex inFieldIndex)=0
Subscribes a side-chain input context field.
virtual AAX_Result AddDataInPort(AAX_CFieldIndex inFieldIndex, uint32_t inPacketSize, AAX_EDataInPortType inPortType=AAX_eDataInPortType_Buffered)=0
Adds a custom data port to the algorithm context.
virtual AAX_Result AddReservedField(AAX_CFieldIndex inFieldIndex, uint32_t inFieldType)=0
Subscribes a context field to host-provided services or information.
virtual AAX_Result AddAudioBufferLength(AAX_CFieldIndex inFieldIndex)=0
Subscribes a buffer length context field.
virtual AAX_Result AddClock(AAX_CFieldIndex inFieldIndex)=0
Subscribes a clock context field.
virtual AAX_Result AddMeters(AAX_CFieldIndex inFieldIndex, const AAX_CTypeID *inMeterIDs, const uint32_t inMeterCount)=0
Adds a meter field to the plug-in's context.
virtual AAX_Result AddAudioIn(AAX_CFieldIndex inFieldIndex)=0
Subscribes an audio input context field.
virtual AAX_Result AddMIDINode(AAX_CFieldIndex inFieldIndex, AAX_EMIDINodeType inNodeType, const char inNodeName[], uint32_t channelMask)=0
Adds a MIDI node field to the plug-in's context.
virtual AAX_Result AddAuxOutputStem(AAX_CFieldIndex inFieldIndex, int32_t inStemFormat, const char inNameUTF8[])=0
Adds an auxiliary output stem for a plug-in.
virtual AAX_Result AddProcessProc_TI(const char inDLLFileNameUTF8[], const char inProcessProcSymbol[], AAX_IPropertyMap *inProperties, const char inInstanceInitProcSymbol[]=NULL, const char inBackgroundProcSymbol[]=NULL, AAX_CSelector *outProcID=NULL)=0
Registers an algorithm processing entrypoint (process procedure) for the native architecture.
virtual AAX_Result AddTemporaryData(AAX_CFieldIndex inFieldIndex, uint32_t inDataElementSize)=0
Adds a block of data to a context that is not saved between callbacks and is scaled by the system buf...
virtual AAX_Result AddSampleRate(AAX_CFieldIndex inFieldIndex)=0
Subscribes a sample rate context field.
virtual AAX_Result AddAudioOut(AAX_CFieldIndex inFieldIndex)=0
Subscribes an audio output context field.
virtual AAX_Result AddDmaInstance(AAX_CFieldIndex inFieldIndex, AAX_IDma::EMode inDmaMode)=0
Adds a DMA field to the plug-in's context.
EMode
DMA mode IDs.
Definition: AAX_IDma.h:71
Generic plug-in description property map.
Definition: AAX_IPropertyMap.h:59