\hypertarget{a00779}{}\doxysection{AAX\+\_\+\+Callbacks.\+h File Reference}
\label{a00779}\index{AAX\_Callbacks.h@{AAX\_Callbacks.h}}
{\ttfamily \#include \char`\"{}AAX.\+h\char`\"{}}\newline


\doxysubsection{Description}
AAX callback prototypes and Proc\+Ptr definitions 

\doxysubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \mbox{\hyperlink{a01798}{AAX\+\_\+\+Component$<$ a\+Context\+Type $>$}}
\begin{DoxyCompactList}\small\item\em Empty class containing type declarations for the AAX algorithm and associated callbacks. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef \mbox{\hyperlink{a01770}{IACFUnknown}} $\ast$(\mbox{\hyperlink{a00542_aaa22112139aa627574b1ef562f579d43}{AAX\+\_\+\+CALLBACK}} $\ast$ \mbox{\hyperlink{a00779_a7b939b72988ffaf3af08a5687feeb56e}{AAXCreate\+Object\+Proc}}) (void)
\item 
typedef \mbox{\hyperlink{a01798}{AAX\+\_\+\+Component}}$<$ void $>$\+::\+CProcess\+Proc \mbox{\hyperlink{a00779_ad6dd5e1aa5bd2f8462966685e3b26a6e}{AAX\+\_\+\+CProcess\+Proc}}
\begin{DoxyCompactList}\small\item\em A user-\/defined callback that AAX calls to process data packets and/or audio. \end{DoxyCompactList}\item 
typedef \mbox{\hyperlink{a01798}{AAX\+\_\+\+Component}}$<$ void $>$\+::\+CPacket\+Allocator \mbox{\hyperlink{a00779_a5c9c7cdc36d5459fa77e5dedb06d161a}{AAX\+\_\+\+CPacket\+Allocator}}
\begin{DoxyCompactList}\small\item\em Used by AAX\+\_\+\+Schedule\+Packet() \end{DoxyCompactList}\item 
typedef \mbox{\hyperlink{a01798}{AAX\+\_\+\+Component}}$<$ void $>$\+::\+CInstance\+Init\+Proc \mbox{\hyperlink{a00779_a3963a850079d3186e08c97a1a4d0ef1c}{AAX\+\_\+\+CInstance\+Init\+Proc}}
\begin{DoxyCompactList}\small\item\em A user-\/defined callback that AAX calls to notify the component that an instance is being added or removed. \end{DoxyCompactList}\item 
typedef \mbox{\hyperlink{a01798}{AAX\+\_\+\+Component}}$<$ void $>$\+::\+CBackground\+Proc \mbox{\hyperlink{a00779_aa64561d963284a3124a0821e7dc79c9a}{AAX\+\_\+\+CBackground\+Proc}}
\begin{DoxyCompactList}\small\item\em A user-\/defined callback that AAX calls in the AAX Idle time. \end{DoxyCompactList}\item 
typedef \mbox{\hyperlink{a01798}{AAX\+\_\+\+Component}}$<$ void $>$\+::\+CInit\+Private\+Data\+Proc \mbox{\hyperlink{a00779_adfb5d89b9d957c541fc98fe42bc050c4}{AAX\+\_\+\+CInit\+Private\+Data\+Proc}}
\begin{DoxyCompactList}\small\item\em A user-\/defined callback to initialize a private data block. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{a00779_af0682195d377392ad356fd2b00c36892}{AAX\+\_\+\+CProc\+Ptr\+ID}} \{ \newline
\mbox{\hyperlink{a00779_af0682195d377392ad356fd2b00c36892a86aab4af036f1087b4f31bbac234ac3d}{k\+AAX\+\_\+\+Proc\+Ptr\+ID\+\_\+\+Create\+\_\+\+Effect\+Parameters}} = 0
, \newline
\mbox{\hyperlink{a00779_af0682195d377392ad356fd2b00c36892a102df0cf99f7423a7997dd283eed7a88}{k\+AAX\+\_\+\+Proc\+Ptr\+ID\+\_\+\+Create\+\_\+\+Effect\+GUI}} = 1
, \newline
\mbox{\hyperlink{a00779_af0682195d377392ad356fd2b00c36892a04ce687ba05b8c7c2cce0b32d868f3db}{k\+AAX\+\_\+\+Proc\+Ptr\+ID\+\_\+\+Create\+\_\+\+Host\+Processor}} = 3
, \newline
\mbox{\hyperlink{a00779_af0682195d377392ad356fd2b00c36892a2d3621474e9eeeda84309dad0a4d8d8e}{k\+AAX\+\_\+\+Proc\+Ptr\+ID\+\_\+\+Create\+\_\+\+Effect\+Direct\+Data}} = 5
, \newline
\mbox{\hyperlink{a00779_af0682195d377392ad356fd2b00c36892aeba711809f385408668d73d0f20d59eb}{k\+AAX\+\_\+\+Proc\+Ptr\+ID\+\_\+\+Create\+\_\+\+Task\+Agent}} = 6
, \newline
\mbox{\hyperlink{a00779_af0682195d377392ad356fd2b00c36892adb35e69a6b1070da2675eb0b39e16cd0}{k\+AAX\+\_\+\+Proc\+Ptr\+ID\+\_\+\+Create\+\_\+\+Session\+Document\+Client}} = 7
 \}
\end{DoxyCompactItemize}


\doxysubsection{Typedef Documentation}
\mbox{\Hypertarget{a00779_a7b939b72988ffaf3af08a5687feeb56e}\label{a00779_a7b939b72988ffaf3af08a5687feeb56e}} 
\index{AAX\_Callbacks.h@{AAX\_Callbacks.h}!AAXCreateObjectProc@{AAXCreateObjectProc}}
\index{AAXCreateObjectProc@{AAXCreateObjectProc}!AAX\_Callbacks.h@{AAX\_Callbacks.h}}
\doxysubsubsection{\texorpdfstring{AAXCreateObjectProc}{AAXCreateObjectProc}}
{\footnotesize\ttfamily typedef \mbox{\hyperlink{a01770}{IACFUnknown}} $\ast$(\mbox{\hyperlink{a00542_aaa22112139aa627574b1ef562f579d43}{AAX\+\_\+\+CALLBACK}} $\ast$ AAXCreate\+Object\+Proc) (void)}

\mbox{\Hypertarget{a00779_ad6dd5e1aa5bd2f8462966685e3b26a6e}\label{a00779_ad6dd5e1aa5bd2f8462966685e3b26a6e}} 
\index{AAX\_Callbacks.h@{AAX\_Callbacks.h}!AAX\_CProcessProc@{AAX\_CProcessProc}}
\index{AAX\_CProcessProc@{AAX\_CProcessProc}!AAX\_Callbacks.h@{AAX\_Callbacks.h}}
\doxysubsubsection{\texorpdfstring{AAX\_CProcessProc}{AAX\_CProcessProc}}
{\footnotesize\ttfamily typedef \mbox{\hyperlink{a01798}{AAX\+\_\+\+Component}}$<$void$>$\+::\+CProcess\+Proc \mbox{\hyperlink{a00779_ad6dd5e1aa5bd2f8462966685e3b26a6e}{AAX\+\_\+\+CProcess\+Proc}}}



A user-\/defined callback that AAX calls to process data packets and/or audio. 

\begin{DoxyParagraph}{i\+Context\+Ptrs\+Begin}
A vector of context pointers. Each element points to the context for one instance of this component. {\ttfamily i\+Context\+Ptrs\+End} gives the upper bound of the vector and {\ttfamily (in\+Context\+Ptrs\+End -\/ in\+Context\+Ptrs\+Begin)} gives the count.
\end{DoxyParagraph}
\begin{DoxyParagraph}{i\+Context\+Ptrs\+End}
The upper bound of the vector at {\ttfamily i\+Context\+Ptrs\+Begin}. {\ttfamily (in\+Context\+Ptrs\+End -\/ i\+Context\+Ptrs\+Begin)} gives the count of this vector.
\end{DoxyParagraph}
The instance vector was originally NULL-\/terminated in earlier versions of this API. However, the STL-\/style begin/end pattern was suggested as a more general representation that could, for instance, allow a vector to be split for parallel processing. \mbox{\Hypertarget{a00779_a5c9c7cdc36d5459fa77e5dedb06d161a}\label{a00779_a5c9c7cdc36d5459fa77e5dedb06d161a}} 
\index{AAX\_Callbacks.h@{AAX\_Callbacks.h}!AAX\_CPacketAllocator@{AAX\_CPacketAllocator}}
\index{AAX\_CPacketAllocator@{AAX\_CPacketAllocator}!AAX\_Callbacks.h@{AAX\_Callbacks.h}}
\doxysubsubsection{\texorpdfstring{AAX\_CPacketAllocator}{AAX\_CPacketAllocator}}
{\footnotesize\ttfamily typedef \mbox{\hyperlink{a01798}{AAX\+\_\+\+Component}}$<$void$>$\+::\+CPacket\+Allocator \mbox{\hyperlink{a00779_a5c9c7cdc36d5459fa77e5dedb06d161a}{AAX\+\_\+\+CPacket\+Allocator}}}



Used by AAX\+\_\+\+Schedule\+Packet() 

\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{a00881__deprecated000002}{Deprecated}}]\end{DoxyRefDesc}


A AAX\+\_\+\+CProcess\+Proc that calls AAX\+\_\+\+Schedule\+Packet() must include a AAX\+\_\+\+CPacket\+Allocator field in its context and register that field with \mbox{\hyperlink{a00948}{AAX}}. AAX will then populate that field with a AAX\+\_\+\+CPacket\+Allocator to pass to AAX\+\_\+\+Schedule\+Packet().

\begin{DoxySeeAlso}{See also}
AAX\+\_\+\+Schedule\+Packet() 
\end{DoxySeeAlso}
\mbox{\Hypertarget{a00779_a3963a850079d3186e08c97a1a4d0ef1c}\label{a00779_a3963a850079d3186e08c97a1a4d0ef1c}} 
\index{AAX\_Callbacks.h@{AAX\_Callbacks.h}!AAX\_CInstanceInitProc@{AAX\_CInstanceInitProc}}
\index{AAX\_CInstanceInitProc@{AAX\_CInstanceInitProc}!AAX\_Callbacks.h@{AAX\_Callbacks.h}}
\doxysubsubsection{\texorpdfstring{AAX\_CInstanceInitProc}{AAX\_CInstanceInitProc}}
{\footnotesize\ttfamily typedef \mbox{\hyperlink{a01798}{AAX\+\_\+\+Component}}$<$void$>$\+::\+CInstance\+Init\+Proc \mbox{\hyperlink{a00779_a3963a850079d3186e08c97a1a4d0ef1c}{AAX\+\_\+\+CInstance\+Init\+Proc}}}



A user-\/defined callback that AAX calls to notify the component that an instance is being added or removed. 

This optional callback allows the component to keep per-\/instance data. It\textquotesingle{}s called before the instance appears in the list supplied to CProcess\+Proc, and then after the instance is removed from the list.

\begin{DoxyParagraph}{i\+Instance\+Context\+Ptr}
A pointer to the context data structure of the instance being added or removed from the processing list.
\end{DoxyParagraph}
\begin{DoxyParagraph}{i\+Action}
Indicates the action that triggered the init callback, e.\+g. whether the instance is being added or removed.
\end{DoxyParagraph}

\begin{DoxyRetVals}{Return values}
{\em Should} & return 0 on success, anything else on failure. Failure will prevent the instance from being created. \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{a00779_aa64561d963284a3124a0821e7dc79c9a}\label{a00779_aa64561d963284a3124a0821e7dc79c9a}} 
\index{AAX\_Callbacks.h@{AAX\_Callbacks.h}!AAX\_CBackgroundProc@{AAX\_CBackgroundProc}}
\index{AAX\_CBackgroundProc@{AAX\_CBackgroundProc}!AAX\_Callbacks.h@{AAX\_Callbacks.h}}
\doxysubsubsection{\texorpdfstring{AAX\_CBackgroundProc}{AAX\_CBackgroundProc}}
{\footnotesize\ttfamily typedef \mbox{\hyperlink{a01798}{AAX\+\_\+\+Component}}$<$void$>$\+::\+CBackground\+Proc \mbox{\hyperlink{a00779_aa64561d963284a3124a0821e7dc79c9a}{AAX\+\_\+\+CBackground\+Proc}}}



A user-\/defined callback that AAX calls in the AAX Idle time. 

This optional callback allows the component to do background processing in whatever manner the plug-\/in developer desires


\begin{DoxyRetVals}{Return values}
{\em Should} & return 0 on success, anything else on failure. Failure will cause the AAX host to signal an error up the callchain. \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{a00779_adfb5d89b9d957c541fc98fe42bc050c4}\label{a00779_adfb5d89b9d957c541fc98fe42bc050c4}} 
\index{AAX\_Callbacks.h@{AAX\_Callbacks.h}!AAX\_CInitPrivateDataProc@{AAX\_CInitPrivateDataProc}}
\index{AAX\_CInitPrivateDataProc@{AAX\_CInitPrivateDataProc}!AAX\_Callbacks.h@{AAX\_Callbacks.h}}
\doxysubsubsection{\texorpdfstring{AAX\_CInitPrivateDataProc}{AAX\_CInitPrivateDataProc}}
{\footnotesize\ttfamily typedef \mbox{\hyperlink{a01798}{AAX\+\_\+\+Component}}$<$void$>$\+::\+CInit\+Private\+Data\+Proc \mbox{\hyperlink{a00779_adfb5d89b9d957c541fc98fe42bc050c4}{AAX\+\_\+\+CInit\+Private\+Data\+Proc}}}



A user-\/defined callback to initialize a private data block. 

\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{a00881__deprecated000003}{Deprecated}}]\end{DoxyRefDesc}


A component that requires private data supplies \mbox{\hyperlink{a00779_adfb5d89b9d957c541fc98fe42bc050c4}{AAX\+\_\+\+CInit\+Private\+Data\+Proc}} callbacks to set its private data to the state it should be in at the start of audio. The component first declares one or more pointers to private data in its context. It then registers each such field with AAX along with its data size, various other attributes, and a \mbox{\hyperlink{a00779_adfb5d89b9d957c541fc98fe42bc050c4}{AAX\+\_\+\+CInit\+Private\+Data\+Proc}}. The AAX\+\_\+\+CInit\+Private\+Data\+Proc always runs on the host system, not the DSP. AAX allocates storage for each private data block and calls its associated \mbox{\hyperlink{a00779_adfb5d89b9d957c541fc98fe42bc050c4}{AAX\+\_\+\+CInit\+Private\+Data\+Proc}} to initialize it. If the component\textquotesingle{}s \mbox{\hyperlink{a00779_ad6dd5e1aa5bd2f8462966685e3b26a6e}{AAX\+\_\+\+CProcess\+Proc}} runs on external hardware, AAX initializes private data blocks on the host system and copies them to the remote system.

\begin{DoxySeeAlso}{See also}
alg\+\_\+pd\+\_\+init
\end{DoxySeeAlso}
\begin{DoxyParagraph}{in\+Field\+Index}
The port ID of the block to be initialized, as generated by \mbox{\hyperlink{a00542_acf807247ecd6e5899dc9dc31644e9a1d}{AAX\+\_\+\+FIELD\+\_\+\+INDEX()}}. A component can register a separate AAX\+\_\+\+CInit\+Private\+Data\+Proc for each of its private data blocks, or it can use fewer functions that switch on {\ttfamily in\+Field\+Index}.
\end{DoxyParagraph}
\begin{DoxyParagraph}{in\+New\+Block}
A pointer to the block to be initialized. If the component runs externally, AAX will copy this block to the remote system after it is initialized.
\end{DoxyParagraph}
\begin{DoxyParagraph}{in\+Size}
The size of the block to be initialized. If a component has multiple private blocks that only need to be zeroed out, say, it can use a single AAX\+\_\+\+CInit\+Private\+Data\+Proc for all of these blocks that zeroes them out according to {\ttfamily in\+Size}.
\end{DoxyParagraph}
\begin{DoxyParagraph}{in\+Controller}
A pointer to the current Effect instance\textquotesingle{}s \mbox{\hyperlink{a02222}{AAX\+\_\+\+IController}}. 
\end{DoxyParagraph}
\begin{DoxyNote}{Note}
Do not directly reference data from this interface when populating {\ttfamily i\+New\+Block}. The data in this block must be fully self-\/contained to ensure portability to a new device or memory space. 
\end{DoxyNote}
\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{a00881__deprecated000004}{Deprecated}}]\end{DoxyRefDesc}


\doxysubsection{Enumeration Type Documentation}
\mbox{\Hypertarget{a00779_af0682195d377392ad356fd2b00c36892}\label{a00779_af0682195d377392ad356fd2b00c36892}} 
\index{AAX\_Callbacks.h@{AAX\_Callbacks.h}!AAX\_CProcPtrID@{AAX\_CProcPtrID}}
\index{AAX\_CProcPtrID@{AAX\_CProcPtrID}!AAX\_Callbacks.h@{AAX\_Callbacks.h}}
\doxysubsubsection{\texorpdfstring{AAX\_CProcPtrID}{AAX\_CProcPtrID}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{a00779_af0682195d377392ad356fd2b00c36892}{AAX\+\_\+\+CProc\+Ptr\+ID}}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{kAAX\_ProcPtrID\_Create\_EffectParameters@{kAAX\_ProcPtrID\_Create\_EffectParameters}!AAX\_Callbacks.h@{AAX\_Callbacks.h}}\index{AAX\_Callbacks.h@{AAX\_Callbacks.h}!kAAX\_ProcPtrID\_Create\_EffectParameters@{kAAX\_ProcPtrID\_Create\_EffectParameters}}}\mbox{\Hypertarget{a00779_af0682195d377392ad356fd2b00c36892a86aab4af036f1087b4f31bbac234ac3d}\label{a00779_af0682195d377392ad356fd2b00c36892a86aab4af036f1087b4f31bbac234ac3d}} 
k\+AAX\+\_\+\+Proc\+Ptr\+ID\+\_\+\+Create\+\_\+\+Effect\+Parameters&\mbox{\hyperlink{a02266}{AAX\+\_\+\+IEffect\+Parameters}} creation procedure \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{kAAX\_ProcPtrID\_Create\_EffectGUI@{kAAX\_ProcPtrID\_Create\_EffectGUI}!AAX\_Callbacks.h@{AAX\_Callbacks.h}}\index{AAX\_Callbacks.h@{AAX\_Callbacks.h}!kAAX\_ProcPtrID\_Create\_EffectGUI@{kAAX\_ProcPtrID\_Create\_EffectGUI}}}\mbox{\Hypertarget{a00779_af0682195d377392ad356fd2b00c36892a102df0cf99f7423a7997dd283eed7a88}\label{a00779_af0682195d377392ad356fd2b00c36892a102df0cf99f7423a7997dd283eed7a88}} 
k\+AAX\+\_\+\+Proc\+Ptr\+ID\+\_\+\+Create\+\_\+\+Effect\+GUI&\mbox{\hyperlink{a02262}{AAX\+\_\+\+IEffect\+GUI}} creation procedure \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{kAAX\_ProcPtrID\_Create\_HostProcessor@{kAAX\_ProcPtrID\_Create\_HostProcessor}!AAX\_Callbacks.h@{AAX\_Callbacks.h}}\index{AAX\_Callbacks.h@{AAX\_Callbacks.h}!kAAX\_ProcPtrID\_Create\_HostProcessor@{kAAX\_ProcPtrID\_Create\_HostProcessor}}}\mbox{\Hypertarget{a00779_af0682195d377392ad356fd2b00c36892a04ce687ba05b8c7c2cce0b32d868f3db}\label{a00779_af0682195d377392ad356fd2b00c36892a04ce687ba05b8c7c2cce0b32d868f3db}} 
k\+AAX\+\_\+\+Proc\+Ptr\+ID\+\_\+\+Create\+\_\+\+Host\+Processor&\mbox{\hyperlink{a02274}{AAX\+\_\+\+IHost\+Processor}} creation procedure \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{kAAX\_ProcPtrID\_Create\_EffectDirectData@{kAAX\_ProcPtrID\_Create\_EffectDirectData}!AAX\_Callbacks.h@{AAX\_Callbacks.h}}\index{AAX\_Callbacks.h@{AAX\_Callbacks.h}!kAAX\_ProcPtrID\_Create\_EffectDirectData@{kAAX\_ProcPtrID\_Create\_EffectDirectData}}}\mbox{\Hypertarget{a00779_af0682195d377392ad356fd2b00c36892a2d3621474e9eeeda84309dad0a4d8d8e}\label{a00779_af0682195d377392ad356fd2b00c36892a2d3621474e9eeeda84309dad0a4d8d8e}} 
k\+AAX\+\_\+\+Proc\+Ptr\+ID\+\_\+\+Create\+\_\+\+Effect\+Direct\+Data&\mbox{\hyperlink{a02258}{AAX\+\_\+\+IEffect\+Direct\+Data}} creation procedure, used by plug-\/ins that want direct access to their alg memory \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{kAAX\_ProcPtrID\_Create\_TaskAgent@{kAAX\_ProcPtrID\_Create\_TaskAgent}!AAX\_Callbacks.h@{AAX\_Callbacks.h}}\index{AAX\_Callbacks.h@{AAX\_Callbacks.h}!kAAX\_ProcPtrID\_Create\_TaskAgent@{kAAX\_ProcPtrID\_Create\_TaskAgent}}}\mbox{\Hypertarget{a00779_af0682195d377392ad356fd2b00c36892aeba711809f385408668d73d0f20d59eb}\label{a00779_af0682195d377392ad356fd2b00c36892aeba711809f385408668d73d0f20d59eb}} 
k\+AAX\+\_\+\+Proc\+Ptr\+ID\+\_\+\+Create\+\_\+\+Task\+Agent&\mbox{\hyperlink{a02346}{AAX\+\_\+\+ITask\+Agent}} creation procedure, used by plug-\/ins that want to process task requests made by the host. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{kAAX\_ProcPtrID\_Create\_SessionDocumentClient@{kAAX\_ProcPtrID\_Create\_SessionDocumentClient}!AAX\_Callbacks.h@{AAX\_Callbacks.h}}\index{AAX\_Callbacks.h@{AAX\_Callbacks.h}!kAAX\_ProcPtrID\_Create\_SessionDocumentClient@{kAAX\_ProcPtrID\_Create\_SessionDocumentClient}}}\mbox{\Hypertarget{a00779_af0682195d377392ad356fd2b00c36892adb35e69a6b1070da2675eb0b39e16cd0}\label{a00779_af0682195d377392ad356fd2b00c36892adb35e69a6b1070da2675eb0b39e16cd0}} 
k\+AAX\+\_\+\+Proc\+Ptr\+ID\+\_\+\+Create\+\_\+\+Session\+Document\+Client&\mbox{\hyperlink{a02326}{AAX\+\_\+\+ISession\+Document\+Client}} creation procedure \\
\hline

\end{DoxyEnumFields}
