1 
2 /*
3  * xa_ipc.h
4  *
5  * Copyright (C) 1995-1998,1999 by Mark Podlipec.
6  * All rights reserved.
7  *
8  * This software may be freely used, copied and redistributed without
9  * fee for non-commerical purposes provided that this copyright
10  * notice is preserved intact on all copies.
11  *
12  * There is no warranty or other guarantee of fitness of this software.
13  * It is provided solely "as is". The author disclaims all
14  * responsibility and liability with respect to this software's usage
15  * or its effect upon hardware or computer systems.
16  *
17  */
18 /****************
19  * Rev History
20  *
21  * 03Jun95 - Created
22  *
23  *******************************/
24 
25 
26 #include <errno.h>
27 
28 /* POD: Make this as big as possible without breaking pipes */
29 /* #define XA_IPC_CHUNK 16384 */
30 
31 #ifdef XA_SOCKET
32 #define XA_IPC_CHUNK 4096    /* or higher?? */
33 #else  /* PIPE */
34 #define XA_IPC_CHUNK 256
35 #endif
36 
37 /*                               */
38 #define XA_IPC_ERR		0x00000
39 #define XA_IPC_OK		0x00001
40 #define XA_IPC_TOD		0x00002
41 #define XA_IPC_BOFL		0x00003
42 /*                               */
43 #define XA_IPC_HELLO		0x00010
44 /*                               */
45 #define XA_IPC_FILE		0x00100
46 #define XA_IPC_UNFILE		0x00101
47 #define XA_IPC_FNAME		0x00102
48 #define XA_IPC_PLAY_FILE	0x00103
49 #define XA_IPC_N_FILE		0x00104
50 #define XA_IPC_P_FILE		0x00105
51 #define XA_IPC_SND_INIT		0x00106
52 #define XA_IPC_SND_ADD		0x00107
53 #define XA_IPC_SND_BUF		0x00108
54 #define XA_IPC_RST_TIME		0x00109
55 #define XA_IPC_VID_TIME		0x0010a
56 #define XA_IPC_MERGEFILE	0x0010b
57 /*                               */
58 #define XA_IPC_AUD_SETUP	0x00200
59 #define XA_IPC_AUD_INIT		0x00201
60 #define XA_IPC_AUD_KILL		0x00202
61 #define XA_IPC_AUD_PREP		0x00203
62 #define XA_IPC_AUD_ON		0x00204
63 #define XA_IPC_AUD_OFF		0x00205
64 #define XA_IPC_AUD_PORT		0x00206
65 #define XA_IPC_AUD_STOG		0x00207
66 #define XA_IPC_AUD_HTOG		0x00208
67 #define XA_IPC_AUD_LTOG		0x00209
68 
69 #define XA_IPC_AUD_ENABLE	0x0020a
70 #define XA_IPC_AUD_MUTE		0x0020b
71 #define XA_IPC_AUD_VOL 		0x0020c
72 #define XA_IPC_AUD_RATE		0x0020d
73 #define XA_IPC_AUD_DEV 		0x0020e
74 #define XA_IPC_AUD_FFLAG	0x0020f
75 #define XA_IPC_AUD_BFLAG	0x00210
76 /*                               */
77 #define XA_IPC_GET_CFREQ	0x00300
78 #define XA_IPC_GET_BSIZE	0x00301
79 #define XA_IPC_GET_STATUS	0x00302
80 #define XA_IPC_GET_PRESENT	0x00303
81 /*                               */
82 #define XA_IPC_SET_AUDBUFF	0x00400
83 #define XA_IPC_SET_KLUDGE2	0x00401
84 #define XA_IPC_SET_KLUDGE900	0x00402
85 /*                               */
86 #define XA_IPC_EXIT		0x0FFFF
87 /*                               */
88 #define XA_IPC_ACK_OK		0x10001
89 #define XA_IPC_ACK_ERR		0x10002
90 #define XA_IPC_ACK_BYE		0x10003
91 
92 typedef struct
93 {
94   xaULONG cmd;
95    xaLONG time;
96   xaULONG len;
97   xaULONG id;
98   xaULONG value;
99 } XA_IPC_HDR;
100 
101 #define XA_FD_READ  0
102 #define XA_FD_WRITE 1
103 #define XA_IAM_VIDEO 1
104 #define XA_IAM_AUDIO 2
105 
106 typedef struct STRUCT_XA_AUD_HDR
107 {
108   xaULONG num;
109   char *filename;
110   xaULONG max_faud_size;
111   XA_SND *first_snd;    /* ptr to first sound chunk */
112   XA_SND *last_snd;     /* ptr to last sound chunk */
113   void (*init_aud)();
114   struct STRUCT_XA_AUD_HDR *next;
115   struct STRUCT_XA_AUD_HDR *prev;
116 } XA_AUD_HDR;
117 
118