8167
|
1 /* The sample format system used lin libaf is based on bitmasks. The
|
|
2 format definition only refers to the storage format not the
|
|
3 resolution. */
|
|
4
|
|
5 // Endianess
|
|
6 #define AF_FORMAT_BE (0<<0) // Big Endian
|
|
7 #define AF_FORMAT_LE (1<<0) // Little Endian
|
|
8 #define AF_FORMAT_END_MASK (1<<0)
|
|
9
|
|
10 #if WORDS_BIGENDIAN // Native endian of cpu
|
|
11 #define AF_FORMAT_NE AF_FORMAT_BE
|
|
12 #else
|
|
13 #define AF_FORMAT_NE AF_FORMAT_LE
|
|
14 #endif
|
|
15
|
|
16 // Signed/unsigned
|
|
17 #define AF_FORMAT_SI (0<<1) // SIgned
|
|
18 #define AF_FORMAT_US (1<<1) // Un Signed
|
|
19 #define AF_FORMAT_SIGN_MASK (1<<1)
|
|
20
|
|
21 // Fixed of floating point
|
|
22 #define AF_FORMAT_I (0<<2) // Int
|
|
23 #define AF_FORMAT_F (1<<2) // Foating point
|
|
24 #define AF_FORMAT_POINT_MASK (1<<2)
|
|
25
|
|
26 // Special flags refering to non pcm data
|
|
27 #define AF_FORMAT_MU_LAW (1<<3) //
|
|
28 #define AF_FORMAT_A_LAW (2<<3) //
|
|
29 #define AF_FORMAT_MPEG2 (3<<3) // MPEG(2) audio
|
|
30 #define AF_FORMAT_AC3 (4<<3) // Dolby Digital AC3
|
|
31 #define AF_FORMAT_IMA_ADPCM AF_FORMAT_LE|AF_FORMAT_SI // Same as 16 bit signed int
|
|
32 #define AF_FORMAT_SPECIAL_MASK (7<<3)
|
8994
|
33
|
|
34 extern char* fmt2str(int format, char* str, size_t size);
|
|
35
|