]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/blob - procsdk_audio_x_xx_xx_xx/test_dsp/framework/audioStreamProc.h
f2cbd834b1739798efcf27574ed603be617c5810
[processor-sdk/performance-audio-sr.git] / procsdk_audio_x_xx_xx_xx / test_dsp / framework / audioStreamProc.h
1 /*
2  *  ======== audioStreamProc.h ========
3  */
5 #ifndef _ASP_H_
6 #define _ASP_H_
7  
8 #include <xdc/std.h>
10 #include "as1-f2-params.h"
11 #include "as1-f2-patchs.h"
12 #include "as1-f2-config.h"
14 // Global debug counter */
15 extern Uint32 gTaskAspCnt; // debug counter for ASP task
17 //   Purpose:   Audio Stream Task Function for initialization of data pointers
18 //              by allocation of memory.
19 Int 
20 PAF_AST_initPhaseMalloc(
21     const PAF_AST_Params *pP, 
22     const PAF_AST_Patchs *pQ, 
23     PAF_AST_Config *pC);
25 //   Purpose:   Audio Stream Task Function for initialization of data values
26 //              from parameters.
27 Int
28 PAF_AST_initPhaseConfig(
29     const PAF_AST_Params *pP, 
30     const PAF_AST_Patchs *pQ, 
31     PAF_AST_Config *pC);
33 //   Purpose:   Audio Stream Task Function for initialization of ACP by
34 //              instantiation of the algorithm.
35 Int
36 PAF_AST_initPhaseAcpAlg(
37     const PAF_AST_Params *pP, 
38     const PAF_AST_Patchs *pQ, 
39     PAF_AST_Config *pC);
41 //   Purpose:   Audio Stream Task Function for initialization of data pointers
42 //              by allocation for common memory and by instantiation for
43 //              algorithms.
44 Int
45 PAF_AST_initPhaseCommon(
46     const PAF_AST_Params *pP, 
47     const PAF_AST_Patchs *pQ, 
48     PAF_AST_Config *pC);
50 //   Purpose:   Audio Stream Task Function for initialization of data values
51 //              from parameters for Algorithm Keys.
52 Int
53 PAF_AST_initPhaseAlgKey(
54     const PAF_AST_Params *pP, 
55     const PAF_AST_Patchs *pQ, 
56     PAF_AST_Config *pC);
58 //   Purpose:   Audio Stream Task Function for initialization of I/O Devices.
59 Int
60 PAF_AST_initPhaseDevice(
61     const PAF_AST_Params *pP, 
62     const PAF_AST_Patchs *pQ, 
63     PAF_AST_Config *pC);
65 //   Purpose:   Audio Stream Task Function for initialization of the Audio
66 //              Frame(s) by memory allocation and loading of data pointers
67 //              and values.
68 Int
69 PAF_AST_initFrame0(
70     const PAF_AST_Params *pP, 
71     const PAF_AST_Patchs *pQ, 
72     PAF_AST_Config *pC, Int z);
74 //   Purpose:   Audio Stream Task Function for initialization or reinitiali-
75 //              zation of the Audio Frame(s) by loading of data values of a
76 //              time-varying nature.
77 Int
78 PAF_AST_initFrame1(
79     const PAF_AST_Params *pP, 
80     const PAF_AST_Patchs *pQ, 
81     PAF_AST_Config *pC, Int z, Int apply);
83 //   Purpose:   Audio Stream Task Function for processing audio data to
84 //              determine the input type without output.
85 Int
86 PAF_AST_autoProcessing(
87     const PAF_AST_Params *pP, 
88     const PAF_AST_Patchs *pQ, 
89     PAF_AST_Config *pC, 
90     Int inputTypeSelect, 
91     ALG_Handle pcmAlgMaster);
93 //   Purpose:   Audio Stream Task Function for processing audio data for
94 //              output on a continuous basis, including detection of the
95 //              input type.
96 //Int
97 //PAF_AST_decodeProcessing(
98 //    const PAF_AST_Params *pP, 
99 //    const PAF_AST_Patchs *pQ, 
100 //    PAF_AST_Config *pC, 
101 //    ALG_Handle decAlgMaster
102 //);
103 Int
104 PAF_AST_decodeProcessing(
105     const PAF_AST_Params *pP, 
106     const PAF_AST_Patchs *pQ, 
107     PAF_AST_Config *pC, 
108     ALG_Handle decAlgMaster, 
109     Int sourceSelect
110 );
112 //   Purpose:   Decoding Function for processing Decode Commands.
113 Int
114 PAF_AST_decodeCommand(
115     const PAF_AST_Params *pP, 
116     const PAF_AST_Patchs *pQ, 
117     PAF_AST_Config *pC);
119 //   Purpose:   Decoding Function for processing Encode Commands.
120 Int
121 PAF_AST_encodeCommand(
122     const PAF_AST_Params *pP, 
123     const PAF_AST_Patchs *pQ, 
124     PAF_AST_Config *pC);
126 //   Purpose:   Decoding Function for reinitializing the decoding process.
127 //Int
128 //PAF_AST_decodeInit(
129 //    const PAF_AST_Params *pP, 
130 //    const PAF_AST_Patchs *pQ, 
131 //    PAF_AST_Config *pC, 
132 //    ALG_Handle decAlg[]
133 //);
134 Int
135 PAF_AST_decodeInit(
136     const PAF_AST_Params *pP, 
137     const PAF_AST_Patchs *pQ, 
138     PAF_AST_Config *pC, 
139     ALG_Handle decAlg[], 
140     Int sourceSelect
141 );
143 //   Purpose:   Decoding Function for processing information in a manner that
144 //              is common for both initial and subsequent frames of input data.
145 Int
146 PAF_AST_decodeInfo(
147     const PAF_AST_Params *pP, 
148     const PAF_AST_Patchs *pQ, 
149     PAF_AST_Config *pC, 
150     ALG_Handle decAlg[], 
151     Int frame, 
152     Int block);
154 //   Purpose:   Decoding Function for processing information in a manner that
155 //              is unique to initial frames of input data.
156 Int
157 PAF_AST_decodeInfo1(
158     const PAF_AST_Params *pP, 
159     const PAF_AST_Patchs *pQ, 
160     PAF_AST_Config *pC, 
161     ALG_Handle decAlg[], 
162     Int frame, 
163     Int block);
165 //   Purpose:   Decoding Function for processing information in a manner that
166 //              is unique to frames of input data other than the initial one.
167 Int
168 PAF_AST_decodeInfo2(
169     const PAF_AST_Params *pP, 
170     const PAF_AST_Patchs *pQ, 
171     PAF_AST_Config *pC, 
172     ALG_Handle decAlg[], 
173     Int frame, 
174     Int block);
176 //   Purpose:   Decoding Function for processing that occurs subsequent to
177 //              information processing but antecedent to timing processing
178 //              for frames of input data other than the initial one.
179 Int
180 PAF_AST_decodeCont(
181     const PAF_AST_Params *pP, 
182     const PAF_AST_Patchs *pQ, 
183     PAF_AST_Config *pC, 
184     ALG_Handle decAlg[], 
185     Int frame, 
186     Int block);
188 //   Purpose:   Decoding Function for processing of input data by the
189 //              Decode Algorithm.
190 //Int
191 //PAF_AST_decodeDecode(
192 //    const PAF_AST_Params *pP, 
193 //    const PAF_AST_Patchs *pQ, 
194 //    PAF_AST_Config *pC, 
195 //    ALG_Handle decAlg[], 
196 //    Int frame, 
197 //    Int block);
198 Int
199 PAF_AST_decodeDecode(
200     const PAF_AST_Params *pP, 
201     const PAF_AST_Patchs *pQ, 
202     PAF_AST_Config *pC, 
203     ALG_Handle decAlg[], 
204     Int sourceSelect, 
205     Int frame, 
206     Int block
207 );
211 //   Purpose:   Decoding Function for processing of audio frame data by the
212 //              ASP Algorithms.
213 Int
214 PAF_AST_decodeStream(
215     const PAF_AST_Params *pP, 
216     const PAF_AST_Patchs *pQ, 
217     PAF_AST_Config *pC, 
218     ALG_Handle decAlg[], 
219     Int frame, 
220     Int block);
222 //   Purpose:   Decoding Function for processing of audio frame data by the
223 //              Encode Algorithm.
224 Int
225 PAF_AST_decodeEncode(
226     const PAF_AST_Params *pP, 
227     const PAF_AST_Patchs *pQ, 
228     PAF_AST_Config *pC, 
229     ALG_Handle decAlg[], 
230     Int frame, 
231     Int block);
233 //   Purpose:   Decoding Function for determining whether processing of the
234 //              current frame is complete.
235 Int
236 PAF_AST_decodeFinalTest(
237     const PAF_AST_Params *pP, 
238     const PAF_AST_Patchs *pQ, 
239     PAF_AST_Config *pC, 
240     ALG_Handle decAlg[], 
241     Int frame, 
242     Int block);
244 //   Purpose:   Decoding Function for terminating the decoding process.
245 Int
246 PAF_AST_decodeComplete(
247     const PAF_AST_Params *pP, 
248     const PAF_AST_Patchs *pQ, 
249     PAF_AST_Config *pC, 
250     ALG_Handle decAlg[], 
251     Int frame, 
252     Int block);
254 //   Purpose:   Audio Stream Task Function for selecting the devices used
255 //              for input and output.
256 Int
257 PAF_AST_selectDevices(
258     const PAF_AST_Params *pP, 
259     const PAF_AST_Patchs *pQ, 
260     PAF_AST_Config *pC);
262 //   Purpose:   Audio Stream Task Function for selecting the sources used
263 //              for decoding of input to output.
264 Int
265 PAF_AST_sourceDecode(
266     const PAF_AST_Params *pP, 
267     const PAF_AST_Patchs *pQ, 
268     PAF_AST_Config *pC, 
269     Int x);
271 //   Purpose:   Decoding Function for initiating output.
272 Int
273 PAF_AST_startOutput(
274     const PAF_AST_Params *pP, 
275     const PAF_AST_Patchs *pQ, 
276     PAF_AST_Config *pC, 
277     double arcRatio) ;
279 //   Purpose:   Decoding Function for terminating output.
280 Int
281 PAF_AST_stopOutput(
282     const PAF_AST_Params *pP, 
283     const PAF_AST_Patchs *pQ, 
284     PAF_AST_Config *pC);
286 //   Purpose:   Decoding Function for reinitiating output.
287 Int
288 PAF_AST_setCheckRateX(
289     const PAF_AST_Params *pP, 
290     const PAF_AST_Patchs *pQ, 
291     PAF_AST_Config *pC, 
292     Int check);
294 //   Purpose:   Common Function for processing algorithm chains.
295 Int
296 PAF_AST_streamChainFunction(
297     const PAF_AST_Params *pP, 
298     const PAF_AST_Patchs *pQ, 
299     PAF_AST_Config *pC, 
300     Int iChainFrameFxns, 
301     Int abortOnError, 
302     Int logArg);
304     
305 #endif /* _ASP_H_ */