1 
2 #ifndef FALSE
3 #define FALSE 0
4 #endif
5 
6 #ifndef False
7 #define False 0
8 #endif
9 
10 #ifndef TRUE
11 #define TRUE 1
12 #endif
13 
14 #ifndef True
15 #define True 1
16 #endif
17 
18 #define TYPE_WAVE 0
19 #define TYPE_AIFC 1
20 #define TYPE_AU 2
21 #define TYPE_RAW 3
22 #define TYPE_NORAW 4
23 #define TYPE_UNDEFINED 5
24 
25 #define ONE_SECOND (long)1000000
26 
27 typedef unsigned char byte;
28 typedef byte bool;
29 
30 #ifdef __FreeBSD__
31 typedef unsigned long ulong;
32 #endif
33 
34 typedef struct Wave_Datas {
35     char	 *name;	           /* name of loaded file */
36     char         *actual_name;     /* changed file on HDD */
37     int           actual_no;       /* index changed file */
38     byte	  res;		   /* 8 or 16 bit */
39     byte	  channels;	   /* */
40     byte         *buffer;	   /* the data */
41     byte	  bpspl;           /* byte per sample */
42     int 	  freq;		   /* frequence */
43     int	          length;	   /* length of data in bytes */
44     int	          markbeg;	   /* the begin of the mark */
45     int	          marklength;	   /* the length of the mark */
46     int	          playbeg;	   /* the begin of the playline */
47     int	          playlength;	   /* the length of the playline */
48     int 	  tlength;	   /* length / bpspl */
49     int	          fd;		   /* fileno if not complete in mem */
50     int           headoffs;
51     int           peak_l;
52     int           peak_r;
53     int           ind_peak_l;      /* index (position) of peak */
54     int           ind_peak_r;
55     ulong         type;            /* AF_TYPE */
56     ulong         comp;            /* AF_COMP */
57     ulong         oldtype;         /* changed files on hd are saved in raw mode */
58     ulong         oldcomp;         /* later they can saved in original format */
59     byte         *lines_l;         /* points for lines for the main */
60     byte         *lines_r;         /* graphic window (speedup) */
61     bool          inmem;
62     bool          ismark;
63     bool          isplay;
64     int           leftsel;
65     int           rightsel;
66 } Wave_Data;
67 
68 typedef struct {
69     char *name;
70     int fd;
71     byte bps;
72     byte channels;
73     ulong comp;
74     ulong type;
75     int freq;
76     int length;
77     int headoffs;
78 } Audio_File;
79