AWECore 8.C.10 API Document
StandardDefs.h
Go to the documentation of this file.
1 /*******************************************************************************
2 *
3 * Audio Framework
4 * ---------------
5 *
6 ********************************************************************************
7 * StandardDefs.h
8 ********************************************************************************
9 *
10 * Description: Standard Audio Weaver data types
11 *
12 * Copyright: (c) 2007-2021 DSP Concepts, Inc. All rights reserved.
13 * 3235 Kifer Road
14 * Santa Clara, CA 95054
15 *
16 *******************************************************************************/
21 #ifndef STANDARD_DEFS_H_
22 #define STANDARD_DEFS_H_
23 
24 // Do not define BOOL for these processor types
25 #if defined(HMD) || defined(HIFI4) || defined(HIFIMINI)
26 #define BOOL_DEFINED
27 #endif
28 
29 #ifndef UINT32_DEFINED
30 #define UINT32_DEFINED
31 #ifndef UINT32
32 //#define UINT32 unsigned int
33 typedef unsigned int UINT32;
34 #endif
35 #endif
36 
37 #ifndef INT32_DEFINED
38 #define INT32_DEFINED
39 #ifndef INT32
40 //#define INT32 int
41 typedef int INT32;
42 #endif
43 #endif
44 
45 #if defined(__ADSP215xx__) && defined(__ADSPSHARC__)
46 #ifndef BOOL
47 #define BOOL bool
48 #endif
49 #else
50 #ifndef BOOL
51 #define BOOL INT32
52 #endif
53 #endif
54 
55 #ifndef MAXINT32
56 #define MAXINT32 ((INT32)0x7fffffffUL)
57 #endif
58 
59 #ifndef MININT32
60 #define MININT32 ((INT32)~MAXINT32)
61 #endif
62 
63 #ifndef INT64_DEFINED
64 #define INT64_DEFINED
65 #ifndef INT64
66 //#define INT64 long long
67 typedef long long INT64;
68 #endif
69 #endif
70 
71 #ifndef MAXINT64
72 #define MAXINT64 ((INT64)0x7ffffffffffffffffULL)
73 #endif
74 
75 #ifndef MININT64
76 #define MININT64 ((INT64)~MAXINT64)
77 #endif
78 
79 #ifndef FLOAT32_DEFINED
80 #define FLOAT32_DEFINED
81 #ifndef FLOAT32
82 //#define FLOAT32 float
83 typedef float FLOAT32;
84 #endif
85 #endif
86 
87 #ifndef FLOAT64_DEFINED
88 #define FLOAT64_DEFINED
89 #ifndef FLOAT64
90 #if defined(__ADSP21000__)
91 typedef long double FLOAT64;
92 #else
93 typedef double FLOAT64;
94 #endif
95 #endif
96 #endif
97 
98 #ifndef INT16_DEFINED
99 #define INT16_DEFINED
100 #ifndef INT16
101 //#define INT16 short
102 typedef short INT16;
103 #endif
104 #endif
105 
106 #ifndef UINT16_DEFINED
107 #define UINT16_DEFINED
108 #ifndef UINT16
109 //#define UINT16 unsigned short
110 typedef unsigned short UINT16;
111 #endif
112 #endif
113 
114 #ifndef INT8_DEFINED
115 #define INT8_DEFINED
116 #ifndef INT8
117 //#define INT8 signed char
118 typedef signed char INT8;
119 #endif
120 #endif
121 
122 #ifndef UINT8_DEFINED
123 #define UINT8_DEFINED
124 #ifndef UINT8
125 //#define UINT8 unsigned char
126 typedef unsigned char UINT8;
127 #endif
128 #endif
129 
130 /* These definitions are needed for Linux */
131 #ifndef INT_DEFINED
132 #define INT_DEFINED
133 #ifndef INT
134 //#define INT int
135 typedef int INT;
136 #endif
137 #endif
138 
139 #ifndef UINT
140 #define UINT unsigned int
141 #endif
142 
143 #ifndef BYTE_DEFINED
144 #define BYTE_DEFINED
145 #ifndef BYTE
146 //#define BYTE unsigned char
147 typedef unsigned char BYTE;
148 #endif
149 #endif
150 
151 #ifndef PBYTE
152 #define PBYTE unsigned char *
153 #endif
154 
155 #ifndef TRUE
156 #define TRUE 1
157 #endif
158 
159 #ifndef FALSE
160 #define FALSE 0
161 #endif
162 
163 #ifndef WORD
164 #define WORD unsigned short
165 #endif
166 
167 #ifndef PWORD
168 #define PWORD unsigned short *
169 #endif
170 
171 #ifndef DWORD
172 #define DWORD unsigned long
173 #endif
174 
175 #ifndef PDWORD
176 #define PDWORD unsigned long *
177 #endif
178 
179 #ifndef NUMOF
180 #define NUMOF(x) (sizeof(x) / sizeof(*x))
181 #endif
182 
183 #ifndef NULL
184 #define NULL 0
185 #endif
186 
187 #ifndef SUCCESS
188 #define SUCCESS 1
189 #endif
190 
191 #ifndef FAILURE
192 #define FAILURE 0
193 #endif
194 
195 #define PASTE(x, y) x ## y
196 #define EVAL(x, y) PASTE(x, y)
197 
198 #ifndef FIXNAME
199 #define FIXNAME(x) EVAL(MODULE_PREFIX, x)
200 #endif
201 
202 #define AWE_UNUSED_VARIABLE(x) ((void)(x))
203 
204 #ifndef SAMPLETYPE_DEFINED
205 #define SAMPLETYPE_DEFINED
206 
209 typedef enum _SampleType
210 {
213 
216 
219 
223 #endif
224 
225 #ifndef DLLSYMBOL
226 #define DLLSYMBOL
227 #endif
228 
229 #ifndef CXX_NOWARN_DLLCLASSIF
230 #define CXX_NOWARN_DLLCLASSIF
231 #endif
232 
233 #ifndef CXX_RESTORE_DLLCLASSIF
234 #define CXX_RESTORE_DLLCLASSIF
235 #endif
236 
237 #endif // STANDARD_DEFS_H_
Sample24bit_high
@ Sample24bit_high
Data is 24 bit PCM aligned to the high bit in 32 bit buffers.
Definition: StandardDefs.h:218
_SampleType
_SampleType
Type of data for I/O.
Definition: StandardDefs.h:210
Sample32bit
@ Sample32bit
Data is 32 bit PCM .
Definition: StandardDefs.h:221
SampleType
enum _SampleType SampleType
Type of data for I/O.
Sample16bit
@ Sample16bit
Data is 16 bit PCM.
Definition: StandardDefs.h:212
Sample24bit_low
@ Sample24bit_low
Data is 24 bit PCM aligned to the low bit in 32 bit buffers.
Definition: StandardDefs.h:215