10260
|
1 #ifndef COMMON_H
|
|
2 #define COMMON_H
|
|
3
|
|
4 #include <stdlib.h>
|
|
5 #include <unistd.h>
|
|
6 #include <string.h>
|
|
7 #include <math.h>
|
|
8
|
|
9 #define DATABLOCK1 20 /* size of 14.4 input block in bytes */
|
|
10 #define DATABLOCK2 38 /* size of 28.8 input block in bytes */
|
|
11 #define DATACHUNK1 1440 /* size of 14.4 input chunk in bytes */
|
|
12 #define DATACHUNK2 2736 /* size of 28.8 input chunk in bytes */
|
|
13 #define AUDIOBLOCK 160 /* size of output block in 16-bit words (320 bytes) */
|
|
14 //#define AUDIOBUFFER 11520 /* size of output buffer in 16-bit words (23040 bytes) */
|
|
15 #define AUDIOBUFFER 12288 /* size of output buffer in 16-bit words (24576 bytes) */
|
|
16
|
|
17 typedef void Real_144;
|
|
18 typedef void Real_288;
|
|
19 typedef void Real_dnet;
|
|
20
|
|
21 /* common prototypes */
|
|
22 Real_144 *init_144 (void);
|
|
23 Real_288 *init_288 (void);
|
|
24 Real_dnet *init_dnet (void);
|
|
25 void free_144 (Real_144 *global);
|
|
26 void free_288 (Real_288 *global);
|
|
27 void free_dnet (Real_dnet *global);
|
|
28 void deinterleave (unsigned char *in, unsigned char *out, unsigned int size);
|
|
29 void swapbytes (unsigned char *in, unsigned char *out, unsigned int len);
|
|
30 void decode_144 (Real_144 *global, unsigned char *source, signed short *target);
|
|
31 void decode_288 (Real_288 *global, unsigned char *in, signed short *out);
|
|
32 int decode_dnet (Real_dnet *global, unsigned char *in, signed short *out, int *freq, int chans);
|
|
33
|
|
34 #endif /* !COMMON_H */
|