[processor-sdk/performance-audio-sr.git] / processor_audio_sdk_1_00_00_00 / pasdk / test_dsp / framework / audioStreamOutProc.h
1 /*
2 * ======== audioStreamOutProc.h ========
3 */
5 #ifndef _ASOP_H_
6 #define _ASOP_H_
8 #include <xdc/std.h>
10 #include "audioStreamProc_params.h"
11 #include "audioStreamProc_patchs.h"
12 #include "audioStreamProc_config.h"
14 // Global debug counter */
15 extern Uint32 gTaskAsopCnt; // debug counter for ASOP task
17 // Purpose: Audio Stream Outpu Task Function for initialization of data pointers
18 // by allocation of memory.
19 Int
20 PAF_ASOT_initPhaseMalloc(
21 const PAF_AST_Params *pP,
22 const PAF_AST_Patchs *pQ,
23 PAF_AST_Config *pC
24 );
26 // Purpose: Audio Stream Output Task Function for initialization of data values
27 // from parameters.
28 Int
29 PAF_ASOT_initPhaseConfig(
30 const PAF_AST_Params *pP,
31 const PAF_AST_Patchs *pQ,
32 PAF_AST_Config *pC
33 );
35 // Purpose: Audio Stream Output Task Function for initialization of ACP by
36 // instantiation of the algorithm.
37 Int
38 PAF_ASOT_initPhaseAcpAlg(
39 const PAF_AST_Params *pP,
40 const PAF_AST_Patchs *pQ,
41 PAF_AST_Config *pC
42 );
44 // (***) FL: ASIT/ASOT currently consider common memory independently.
45 // Should simultaneously consider all algs in ASIT/ASOT.
46 // Purpose: Audio Stream Output Task Function for allocation of common memory.
47 Int
48 PAF_ASOT_initPhaseCommon(
49 const PAF_AST_Params *pP,
50 const PAF_AST_Patchs *pQ,
51 PAF_AST_Config *pC
52 );
54 // Purpose: Audio Stream Output Task Function for initialization of ASP algorithms.
55 Int
56 PAF_ASOT_initPhaseAspAlg(
57 const PAF_AST_Params *pP,
58 const PAF_AST_Patchs *pQ,
59 PAF_AST_Config *pC
60 );
62 // Purpose: Audio Stream Output Task Function for initialization of data values
63 // from parameters for Algorithm Keys.
64 Int
65 PAF_ASOT_initPhaseAlgKey(
66 const PAF_AST_Params *pP,
67 const PAF_AST_Patchs *pQ,
68 PAF_AST_Config *pC
69 );
71 // Purpose: Audio Stream Output Task Function for initialization of Input Devices.
72 Int
73 PAF_ASOT_initPhaseDevice(
74 const PAF_AST_Params *pP,
75 const PAF_AST_Patchs *pQ,
76 PAF_AST_Config *pC
77 );
79 // Purpose: Audio Stream Output Task Function for initialization of the Audio
80 // Frame(s) by memory allocation and loading of data pointers
81 // and values.
82 Int
83 PAF_ASOT_initFrame0(
84 const PAF_AST_Params *pP,
85 const PAF_AST_Patchs *pQ,
86 PAF_AST_Config *pC,
87 Int z
88 );
90 // Purpose: Audio Stream Task Function for initialization or reinitiali-
91 // zation of the Audio Frame(s) by loading of data values of a
92 // time-varying nature.
93 Int
94 PAF_ASOT_initFrame1(
95 const PAF_AST_Params *pP,
96 const PAF_AST_Patchs *pQ,
97 PAF_AST_Config *pC,
98 Int z,
99 Int apply
100 );
102 // Purpose: Audio Stream Output Task Function for selecting the devices used
103 // for output.
104 Int
105 PAF_ASOT_selectDevices(
106 const PAF_AST_Params *pP,
107 const PAF_AST_Patchs *pQ,
108 PAF_AST_Config *pC
109 );
111 // Purpose: Audio Stream Output Task Function for processing audio data.
112 //
113 Int
114 PAF_ASOT_decodeProcessing(
115 const PAF_AST_Params *pP,
116 const PAF_AST_Patchs *pQ,
117 PAF_AST_Config *pC,
118 Int sourceSelect
119 );
121 // Purpose: Decoding Function for processing Encode Commands.
122 Int
123 PAF_ASOT_encodeCommand(
124 const PAF_AST_Params *pP,
125 const PAF_AST_Patchs *pQ,
126 PAF_AST_Config *pC
127 );
129 // Purpose: Decoding Function for reinitializing the decoding process.
130 Int
131 PAF_ASOT_decodeInit(
132 const PAF_AST_Params *pP,
133 const PAF_AST_Patchs *pQ,
134 PAF_AST_Config *pC,
135 Int sourceSelect
136 );
138 // Purpose: Decoding Function for processing information in a manner that
139 // is unique to initial frames of input data.
140 Int
141 PAF_ASOT_decodeInfo(
142 const PAF_AST_Params *pP,
143 const PAF_AST_Patchs *pQ,
144 PAF_AST_Config *pC,
145 Int frame,
146 Int block
147 );
149 // Purpose: Decoding Function for processing information in a manner that
150 // is unique to initial frames of input data.
151 Int
152 PAF_ASOT_decodeInfo1(
153 const PAF_AST_Params *pP,
154 const PAF_AST_Patchs *pQ,
155 PAF_AST_Config *pC,
156 Int frame,
157 Int block
158 );
160 // Purpose: Decoding Function for processing information in a manner that
161 // is unique to frames of input data other than the initial one.
162 Int
163 PAF_ASOT_decodeInfo2(
164 const PAF_AST_Params *pP,
165 const PAF_AST_Patchs *pQ,
166 PAF_AST_Config *pC,
167 Int frame,
168 Int block
169 );
171 // Purpose: Decoding Function for processing of audio frame data by the
172 // ASP Algorithms.
173 Int
174 PAF_ASOT_decodeStream(
175 const PAF_AST_Params *pP,
176 const PAF_AST_Patchs *pQ,
177 PAF_AST_Config *pC,
178 Int frame,
179 Int block
180 );
182 // Purpose: Decoding Function for processing of audio frame data by the
183 // Encode Algorithm.
184 Int
185 PAF_ASOT_decodeEncode(
186 const PAF_AST_Params *pP,
187 const PAF_AST_Patchs *pQ,
188 PAF_AST_Config *pC,
189 Int frame,
190 Int block
191 );
193 // Purpose: Decoding Function for terminating the decoding process.
194 Int
195 PAF_ASOT_decodeComplete(
196 const PAF_AST_Params *pP,
197 const PAF_AST_Patchs *pQ,
198 PAF_AST_Config *pC,
199 ALG_Handle decAlg[],
200 Int frame,
201 Int block
202 );
204 // Purpose: Decoding Function for initiating output.
205 Int
206 PAF_ASOT_startOutput(
207 const PAF_AST_Params *pP,
208 const PAF_AST_Patchs *pQ,
209 PAF_AST_Config *pC
210 );
212 // Purpose: Decoding Function for terminating output.
213 Int
214 PAF_ASOT_stopOutput(
215 const PAF_AST_Params *pP,
216 const PAF_AST_Patchs *pQ,
217 PAF_AST_Config *pC
218 );
220 // Purpose: Decoding Function for re-initiating output.
221 Int
222 PAF_ASOT_setCheckRateX(
223 const PAF_AST_Params *pP,
224 const PAF_AST_Patchs *pQ,
225 PAF_AST_Config *pC,
226 Int check
227 );
229 // Purpose: Common Function for processing algorithm chains.
230 Int
231 PAF_ASOT_streamChainFunction(
232 const PAF_AST_Params *pP,
233 const PAF_AST_Patchs *pQ,
234 PAF_AST_Config *pC,
235 Int iChainFrameFxns,
236 Int abortOnError,
237 Int logArg
238 );
240 #endif /* _ASOP_H_ */