~ubuntu-branches/ubuntu/maverick/qgo/maverick

« back to all changes in this revision

Viewing changes to src/wavplay.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin A. Godisch
  • Date: 2005-01-01 23:07:10 UTC
  • Revision ID: james.westby@ubuntu.com-20050101230710-fhng6yidm47xlb2i
Tags: upstream-1.0.0-r2
ImportĀ upstreamĀ versionĀ 1.0.0-r2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Header: /cvsroot/qgo/qgo/src/wavplay.h,v 1.3 2004/10/30 23:35:00 yfh2 Exp $
 
2
 * Warren W. Gay VE3WWG         Sun Feb 16 18:17:17 1997
 
3
 *
 
4
 * WAVPLAY OPTION SETTINGS:
 
5
 *
 
6
 *      X LessTif WAV Play :
 
7
 * 
 
8
 *      Copyright (C) 1997  Warren W. Gay VE3WWG
 
9
 * 
 
10
 * This  program is free software; you can redistribute it and/or modify it
 
11
 * under the  terms  of  the GNU General Public License as published by the
 
12
 * Free Software Foundation version 2 of the License.
 
13
 * 
 
14
 * This  program  is  distributed  in  the hope that it will be useful, but
 
15
 * WITHOUT   ANY   WARRANTY;   without   even  the   implied   warranty  of
 
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 
17
 * Public License for more details (see enclosed file COPYING).
 
18
 * 
 
19
 * You  should have received a copy of the GNU General Public License along
 
20
 * with this  program; if not, write to the Free Software Foundation, Inc.,
 
21
 * 675 Mass Ave, Cambridge, MA 02139, USA.
 
22
 * 
 
23
 * Send correspondance to:
 
24
 * 
 
25
 *      Warren W. Gay VE3WWG
 
26
 * 
 
27
 * Email:
 
28
 *      ve3wwg@yahoo.com
 
29
 *      wgay@mackenziefinancial.com
 
30
 *
 
31
 *
 
32
 * Revision 1.1  2003/04/07 10:28:54  frosla
 
33
 * 0.0.16b3: added real sound support for Unix!!!!
 
34
 *
 
35
 * Revision 1.3  1999/12/04 00:05:34  wwg
 
36
 * Fixed release number
 
37
 *
 
38
 * Revision 1.2  1999/12/04 00:01:20  wwg
 
39
 * Implement wavplay-1.4 release changes
 
40
 *
 
41
 * Revision 1.1.1.1  1999/11/21 19:50:56  wwg
 
42
 * Import wavplay-1.3 into CVS
 
43
 *
 
44
 * Revision 1.4  1997/04/17 23:39:26  wwg
 
45
 * Now at 1.0pl2 : attempting to fix Linux 2.0.29 compile problems
 
46
 * with the way errno and sys_errlist[] are handled for thread
 
47
 * safety.. here we removed our incompatible extern sys_errlist[]
 
48
 *
 
49
 * Revision 1.3  1997/04/17 01:59:37  wwg
 
50
 * Added version change to reflect patch level "1.0pl1"
 
51
 *
 
52
 * Revision 1.2  1997/04/17 00:27:36  wwg
 
53
 * Fixed references to the name errno. For thread safety
 
54
 * this name has been macro-ized, which I should have
 
55
 * anticipated, since I knew it was coming.
 
56
 *
 
57
 * Revision 1.1  1997/04/14 00:56:48  wwg
 
58
 * Initial revision
 
59
 *
 
60
 */
 
61
 
 
62
 
 
63
 
 
64
#ifndef _wavplay_h_
 
65
#define _wavplay_h_ "$Id: wavplay.h,v 1.3 2004/10/30 23:35:00 yfh2 Exp $"
 
66
 
 
67
#define WAVPLAY_VERSION         "1.4"
 
68
 
 
69
 
 
70
#include <stdarg.h>
 
71
#include <sys/types.h>
 
72
#include <sys/ipc.h>
 
73
#include <sys/stat.h>
 
74
#include <pthread.h>
 
75
 
 
76
 
 
77
/*
 
78
 * From the man page semctl(2) :
 
79
 */
 
80
#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
 
81
        /* union semun is defined by including <sys/sem.h> */
 
82
#else
 
83
        /* according to X/OPEN we have to define it ourselves */
 
84
        union semun {
 
85
                int             val;            /* value for SETVAL */
 
86
                struct semid_ds *buf;           /* buffer for IPC_STAT, IPC_SET */
 
87
                unsigned short  *array;         /* array for GETALL, SETALL */
 
88
                struct seminfo  *__buf;         /* buffer for IPC_INFO */
 
89
        };
 
90
#endif
 
91
 
 
92
typedef void (*ErrFunc)(const char *format,va_list ap);
 
93
 
 
94
#include "wavfile.h"
 
95
 
 
96
/*
 
97
 * Default location of the wavplay server program if not overrided by the Makefile
 
98
 */
 
99
#ifndef WAVPLAYPATH
 
100
#define WAVPLAYPATH "/usr/local/bin/wavplay"    /* Default location of wavplay server */
 
101
#endif
 
102
 
 
103
/*
 
104
 * Default pathname for recordings if not overriden by the Makefile:
 
105
 */
 
106
#ifndef RECORD_PATH
 
107
#define RECORD_PATH "recorded.wav"
 
108
#endif
 
109
 
 
110
/*
 
111
 * Default lowest sampling rate unless overriden by the Makefile:
 
112
 */
 
113
#ifndef DSP_MIN
 
114
#define DSP_MIN         4000                    /* Lowest acceptable sample rate */
 
115
#endif
 
116
 
 
117
/*
 
118
 * Default maximum sampling rate unless overrided by the Makefile:
 
119
 */
 
120
#ifndef DSP_MAX
 
121
#define DSP_MAX         48000                   /* Highest acceptable sample rate */
 
122
#endif
 
123
 
 
124
/*
 
125
 * Default pathname of the audio device, unless overrided by the Makefile:
 
126
 */
 
127
#ifndef AUDIODEV
 
128
#define AUDIODEV        "/dev/dsp"              /* Default pathname for audio device */
 
129
#endif
 
130
 
 
131
/*
 
132
 * Default locking semaphore IPC Key, unless overrided by the Makefile:
 
133
 */
 
134
#ifndef AUDIOLCK
 
135
#define AUDIOLCK        0x33333333              /* Default IPC Key for semaphores */
 
136
#endif
 
137
 
 
138
/*
 
139
 * Short option flag characters:
 
140
 */
 
141
#define OPF_DEVICE      'd'                     /* -d device ; Override /dev/dsp default */
 
142
#define OPF_INFO        'i'                     /* -i ; info mode option */
 
143
#define OPF_HELP        'h'                     /* -h ; help optino */
 
144
#define OPF_QUIET       'q'                     /* -q ; quiet mode */
 
145
#define OPF_SAMPRATE    's'                     /* -s rate ; Sampling rate */
 
146
#define OPF_STEREO      'S'                     /* -S ; Stereo */
 
147
#define OPF_MONO        'M'                     /* -M ; Mono */
 
148
#define OPF_TIME        't'                     /* -t seconds ; Time option */
 
149
#define OPF_DATABITS    'b'                     /* -b data_bits; sample bits */
 
150
#define OPF_IPCKEY      'k'                     /* -k key ; IPC Key */
 
151
#define OPF_RESET       'R'                     /* -r ; reset semaphores option */
 
152
#define OPF_PLAY_LOCK   'l'                     /* -l ; lock for play option */
 
153
#define OPF_PLAY_UNLOCK 'u'                     /* -u ; unlock play option */
 
154
#define OPF_RECD_LOCK   'L'                     /* -L ; lock for record option */
 
155
#define OPF_RECD_UNLOCK 'U'                     /* -U ; unlock record option */
 
156
#define OPF_DEBUG       'x'                     /* -x ; debug option */
 
157
#define OPF_VERSION     'V'                     /* -V ; version and copyright */
 
158
 
 
159
/*
 
160
 * Types internal to wavplay, in an attempt to isolate ourselves from
 
161
 * a dependance on a particular platform.
 
162
 */
 
163
typedef unsigned char Byte;
 
164
typedef short Int16;
 
165
typedef long Int32;
 
166
typedef unsigned long UInt32;
 
167
typedef unsigned short UInt16;
 
168
 
 
169
/*
 
170
 * This value sets buffer sizes for temporary buffers that sprintf()
 
171
 * uses, and for copying pathnames around in. You probably don't want
 
172
 * to mess with this.
 
173
 */
 
174
#define MAXTXTLEN       2048                    /* Must allow for long pathnames */
 
175
 
 
176
/*
 
177
 * These are the wavplay command operation modes.
 
178
 */
 
179
typedef enum {
 
180
        OprNoMode=0,                            /* No mode given (not determined yet) */
 
181
        OprRecord=1,                            /* wavplay command is in "Record Mode" */
 
182
        OprPlay=2,                              /* wavplay command is in "Play Mode" */
 
183
        OprServer=3                             /* wavplay is accting in "Server Mode" */
 
184
} OprMode;
 
185
 
 
186
/*
 
187
 * This enumerated type, selects between monophonic sound and
 
188
 * stereo sound (1 or 2 channels).
 
189
 */
 
190
typedef enum {
 
191
        Mono,                                   /* Monophonic sound (1 channel) */
 
192
        Stereo                                  /* Stereo sound (2 channels) */
 
193
} Chan;
 
194
 
 
195
/*
 
196
 * This type is used for those options that can be one or another
 
197
 * option flags (represented as the ASCII character), or no option
 
198
 * flags at all (zero value, ie. 0x00).
 
199
 */
 
200
typedef struct {
 
201
        char    optChar;                        /* Option character */
 
202
} FlgOpt;
 
203
 
 
204
/*
 
205
 * This type represents any unsigned 32 bit option value, if the member
 
206
 * optChar is non-zero (usually holds the ASCII flag option character).
 
207
 * If optChar is zero, then no value is present (or specified).
 
208
 */
 
209
typedef struct {
 
210
        char    optChar;                        /* Zero if not valid, else non-zero if active */
 
211
        UInt32  optValue;                       /* The unsigned 32 bit value if optChar is true */
 
212
} U32Opt;
 
213
 
 
214
typedef struct {
 
215
        char    optChar;                        /* Zero if not valid, else non-zero if active */
 
216
        UInt16  optValue;                       /* The unsigned 16 bit value if optChar is true */
 
217
} U16Opt;
 
218
 
 
219
typedef struct {
 
220
        char    optChar;                        /* Zero if not valid, else non-zero if active */
 
221
        Chan    optValue;                       /* The enumerated value for Stereo/Mono */
 
222
} ChnOpt;
 
223
 
 
224
/*
 
225
 * This structure holds the command line options for the wavplay command.
 
226
 * It is also used to pass option values around (in server mode etc.)
 
227
 */
 
228
typedef struct {
 
229
        key_t   IPCKey;                         /* Default IPC Key for lock */
 
230
        OprMode Mode;                           /* Operation Mode: OprRecord or OprPlay */
 
231
        FlgOpt  PlayLock;                       /* -l or -u option flag */
 
232
        FlgOpt  RecdLock;                       /* -L or -U option flag */
 
233
        char    bResetLocks;                    /* True if semaphores are to be reset */
 
234
        char    bQuietMode;                     /* True if quiet mode is requested */
 
235
        char    bInfoMode;                      /* True if only wav header info is to be printed */
 
236
        U32Opt  SamplingRate;                   /* -s rate ; sampling rate in Hz */
 
237
        ChnOpt  Channels;                       /* -S ; or no -S option (stereo/mono respectively) */
 
238
        U16Opt  DataBits;                       /* -b bits ; number of bits per sample */
 
239
        UInt32  Seconds;                        /* Time limited to this many seconds, else zero */
 
240
        UInt32  StartSample;                    /* Sample to start playback with */
 
241
        int     ipc;                            /* Semaphore IPC ID */
 
242
} WavPlayOpts;
 
243
 
 
244
/*
 
245
 * These values represent values found in/or destined for a
 
246
 * WAV file.
 
247
 */
 
248
typedef struct {
 
249
        UInt32  SamplingRate;                   /* Sampling rate in Hz */
 
250
        Chan    Channels;                       /* Mono or Stereo */
 
251
        UInt32  Samples;                        /* Sample count */      
 
252
        UInt16  DataBits;                       /* Sample bit size (8/12/16) */
 
253
        UInt32  DataStart;                      /* Offset to wav data */
 
254
        UInt32  DataBytes;                      /* Data bytes in current chunk */
 
255
        char    bOvrSampling;                   /* True if sampling_rate overrided */
 
256
        char    bOvrMode;                       /* True if chan_mode overrided */
 
257
        char    bOvrBits;                       /* True if data_bits is overrided */
 
258
} WAVINF;
 
259
 
 
260
/*
 
261
 * This structure manages an open WAV file.
 
262
 */
 
263
typedef struct {
 
264
        char    rw;                             /* 'R' for read, 'W' for write */
 
265
        char    *Pathname;                      /* Pathname of wav file */
 
266
        int     fd;                             /* Open file descriptor or -1 */
 
267
        WAVINF  wavinfo;                        /* WAV file hdr info */
 
268
        UInt32  num_samples;                    /* Total number of samples */
 
269
        UInt32  StartSample;                    /* First sample to play */
 
270
} WAVFILE;
 
271
 
 
272
/*
 
273
 * This macro is used to return the system file descriptor
 
274
 * associated with the open WAV file, given a (WAVFILE *).
 
275
 */
 
276
#define WAV_FD(wfile) (wfile->fd)               /* Return file descriptor */
 
277
 
 
278
/*
 
279
 * This structure manages an opened DSP device.
 
280
 */
 
281
typedef struct {
 
282
        int     fd;                             /* Open fd of /dev/dsp */
 
283
        int     dspblksiz;                      /* Size of the DSP buffer */
 
284
        char    *dspbuf;                        /* The buffer */
 
285
} DSPFILE;
 
286
 
 
287
/*
 
288
 * This structure manages server information and state:
 
289
 */
 
290
typedef struct {
 
291
        UInt32  SamplingRate;                   /* Sampling rate in Hz */
 
292
        Chan    Channels;                       /* Mono or Stereo */
 
293
        UInt32  Samples;                        /* Sample count */      
 
294
        UInt16  DataBits;                       /* Sample bit size (8/12/16) */
 
295
        char    WavType[16];                    /* "PCM" */
 
296
        char    bOvrSampling;                   /* True if sampling is overrided */
 
297
        char    bOvrMode;                       /* True if mode is overrided */
 
298
        char    bOvrBits;                       /* True if bits is overrided */
 
299
} SVRINF;
 
300
 
 
301
/*
 
302
 * This is the function type that is called between blocks
 
303
 * of I/O with the DSP.
 
304
 */
 
305
typedef int (*DSPPROC)(DSPFILE *dfile);         /* DSP work procedure */
 
306
 
 
307
/*
 
308
 * Client/Server Message Types. These definitions must be coordinated with
 
309
 * source module msg.c, function msg_name(), for their corresponding
 
310
 * message texts.
 
311
 */
 
312
typedef enum {
 
313
        ToClnt_Fatal=0,                         /* Fatal server error */
 
314
        ToClnt_Ready=1,                         /* Tell client that server is ready */
 
315
        ToSvr_Bye=2,                            /* Client tells server to exit */
 
316
        ToSvr_Path=3,                           /* Client tells server a pathname */
 
317
        ToClnt_Path=4,                          /* Client tells server a pathname */
 
318
        ToClnt_Stat=5,                          /* Response: Svr->Clnt to ToSvr_Path */
 
319
        ToClnt_WavInfo=6,                       /* Server tells client wav info */
 
320
        ToSvr_Play=7,                           /* Client tells server to play */
 
321
        ToSvr_Pause=8,                          /* Tell server to pause */
 
322
        ToSvr_Stop=9,                           /* Tell server to stop */
 
323
        ToSvr_Bits=10,                          /* Tell server to use 8 bits */
 
324
        ToClnt_Bits=11,                         /* Server tells what bit setting is in effect */
 
325
        ToClnt_Settings=12,                     /* Current server settings */
 
326
        ToSvr_SamplingRate=13,                  /* Tell server new sampling rate */
 
327
        ToSvr_Restore=14,                       /* Clear overrides: restore original settings */
 
328
        ToSvr_Chan=15,                          /* Change Stereo/Mono mode */
 
329
        ToSvr_Record=16,                        /* Tell server to start recording */
 
330
        ToSvr_Debug=17,                         /* Tell server debug mode setting */
 
331
        ToClnt_ErrMsg=18,                       /* Pass back to client, an error message string */
 
332
        ToSvr_SemReset=19,                      /* Reset locking semaphores */
 
333
        ToSvr_StartSample=20,                   /* Start playback at requested sample */
 
334
        ToClnt_PlayState=21,                    /* Playback status */
 
335
        ToClnt_RecState=22,                     /* Record status */
 
336
        MSGTYP_Last=23                         /* This is not really a message type */
 
337
} MSGTYP;
 
338
 
 
339
/*
 
340
 * Client/Server Message Structure: This consists of a common header
 
341
 * component, and then a union of specific format variations according
 
342
 * to the message type.
 
343
 */
 
344
typedef struct {
 
345
        long    type;                           /* Message Type: 1=server, 0=client */
 
346
        MSGTYP  msg_type;                       /* Client/Server message type */
 
347
        UInt16  bytes;                          /* Byte length of the union */
 
348
        union   {
 
349
 
 
350
                /*
 
351
                 * Message from server to client, to convey a fatal error that
 
352
                 * has occured in the server.
 
353
                 */
 
354
                struct  {
 
355
                        int     Errno;          /* Error code */
 
356
                        char    msg[128];       /* Error message text */
 
357
                } toclnt_fatal;
 
358
 
 
359
                /*
 
360
                 * Message from the X client, to the server, to indicate that
 
361
                 * a new pathname is to be referenced.
 
362
                 */
 
363
                struct  {
 
364
                        char    path[1024];     /* Pathname */
 
365
                } tosvr_path;                   /* Tell server a pathname */
 
366
 
 
367
                /*
 
368
                 * Message from the server to the X client, to indicate
 
369
                 * that the indicated pathname has been accepted and
 
370
                 * ready (the pathname may be canonicalized at some future
 
371
                 * revision of the server)
 
372
                 */
 
373
                struct  {
 
374
                        char    path[1024];     /* Pathname */
 
375
                } toclnt_path;                  /* ..from server as confirmation */
 
376
 
 
377
                /*
 
378
                 * Message to X client, from the server, indicating a
 
379
                 * stat() error when Errno != 0, or stat() information
 
380
                 * when Errno == 0.
 
381
                 */
 
382
                struct  {
 
383
                        int     Errno;          /* Zero if OK, else errno from stat() */
 
384
                        struct stat sbuf;       /* Path's stat info */
 
385
                } toclnt_stat;
 
386
 
 
387
                /*
 
388
                 * Message to X client, from server, indicating an
 
389
                 * error if errno != 0, or successfully obtained
 
390
                 * WAV file info if errno == 0.
 
391
                 */
 
392
                struct  {
 
393
                        int     Errno;          /* Zero if OK, else errno value */
 
394
                        WAVINF  wavinfo;        /* WAV file info */
 
395
                        char    errmsg[256];    /* Error message */
 
396
                } toclnt_wavinfo;
 
397
 
 
398
                /*
 
399
                 * Message from X client, to server, indicating how
 
400
                 * many bits per sample to use (request).
 
401
                 */
 
402
                struct  {
 
403
                        int     DataBits;       /* 8/12/16 bit override requested */
 
404
                } tosvr_bits;
 
405
 
 
406
                /*
 
407
                 * Message to X client, from server, indicating
 
408
                 * the accepted number of bits per sample (response
 
409
                 * to request).
 
410
                 */
 
411
                struct  {
 
412
                        int     DataBits;       /* Server says this # of bits in effect */
 
413
                } toclnt_bits;
 
414
 
 
415
                /*
 
416
                 * Message to X client, from server, indicating the
 
417
                 * current server settings.
 
418
                 */
 
419
                SVRINF  toclnt_settings;        /* Current server settings */
 
420
 
 
421
                /*
 
422
                 * Message from X client, to server, indicating the
 
423
                 * requested sampling rate to use (request).
 
424
                 */
 
425
                struct S_SvrSampRate {
 
426
                        UInt32  SamplingRate;   /* In Hz */
 
427
                } tosvr_sampling_rate;
 
428
 
 
429
                /*
 
430
                 * Message from X client, to server, indicating the
 
431
                 * number of channels to use (request).
 
432
                 */
 
433
                struct  {
 
434
                        Chan    Channels;       /* New channel mode: Stereo/Mono */
 
435
                } tosvr_chan;
 
436
 
 
437
                /*
 
438
                 * Message from X client, to server, indicating the sample to
 
439
                 * start playback at (request).
 
440
                 */
 
441
                struct  {
 
442
                        UInt32  StartSample;    /* New origin */
 
443
                } tosvr_start_sample;
 
444
 
 
445
                /*
 
446
                 * Message from X client, to server, indicating the
 
447
                 * channels to use, the sampling rate to use, and
 
448
                 * the data bits per channel to use (request).
 
449
                 */
 
450
                struct  {
 
451
                        Chan    Channels;       /* Stereo or Mono */
 
452
                        UInt32  SamplingRate;   /* Start recording at this rate */
 
453
                        UInt16  DataBits;       /* 8/12/16 data bits */
 
454
                } tosvr_record;
 
455
 
 
456
                /*
 
457
                 * Message from X client to server, to set the server's
 
458
                 * debug mode global (cmdopt_x).
 
459
                 */
 
460
                struct  {
 
461
                        char    bDebugMode;     /* True if debug mode set, else not debug mode */
 
462
                } tosvr_debug;
 
463
 
 
464
                /*
 
465
                 * Message from server to client, to convey a NON-fatal error that
 
466
                 * has occured in the server.
 
467
                 */
 
468
                struct  {
 
469
                        int     Errno;          /* Error code */
 
470
                        char    msg[512];       /* Error message text */
 
471
                } toclnt_errmsg;
 
472
 
 
473
                /*
 
474
                 * Message from server to client with playback status.
 
475
                 */
 
476
                struct {
 
477
                        int     CurrentSample;  /* Currently playing sample */
 
478
                        int     SamplesLeft;    /* Samples left */
 
479
                } toclnt_playstate;
 
480
 
 
481
                /*
 
482
                 * Message from server to client with record status.
 
483
                 */
 
484
                struct {
 
485
                        int     bytes_written;  /* Number of bytes sampled */
 
486
                        int     num_samples;    /* Samples taken */
 
487
                } toclnt_recstate;
 
488
        } u;                                    /* The message union of all message types */
 
489
} SVRMSG;
 
490
 
 
491
extern char *ProcTerm(int procstat);
 
492
 
 
493
extern int MsgCreate(void);
 
494
extern int MsgSend(int ipcid,SVRMSG *msg,int flags,long msgtype);
 
495
extern int MsgRecv(int ipcid,SVRMSG *msg,int flags,long msgtype);
 
496
extern int MsgClose(int ipcid);
 
497
extern char *msg_name(MSGTYP mtyp);
 
498
extern void msg_dump(const char *desc,MSGTYP mtyp);
 
499
 
 
500
#define MSGNO_CLNT      3L
 
501
#define MSGNO_SRVR      2L
 
502
#define MsgToClient(ipcid,msg,flags) MsgSend(ipcid,msg,flags,MSGNO_CLNT)
 
503
#define MsgToServer(ipcid,msg,flags) MsgSend(ipcid,msg,flags,MSGNO_SRVR)
 
504
#define MsgFromClient(ipcid,msg,flags) MsgRecv(ipcid,msg,flags,MSGNO_SRVR)
 
505
#define MsgFromServer(ipcid,msg,flags) MsgRecv(ipcid,msg,flags,MSGNO_CLNT)
 
506
 
 
507
extern int OpenDSPLocks(key_t LockIPCKey,int SemUndoFlag,ErrFunc erf);
 
508
extern int LockDSP(int ipc,int playrecx,ErrFunc erf,unsigned timeout_secs);
 
509
extern int UnlockDSP(int ipc,int playrecx,ErrFunc erf);
 
510
 
 
511
extern WAVFILE *WavOpenForRead(const char *Pathname,ErrFunc erf);
 
512
extern WAVFILE *WavOpenForWrite(const char *Pathname,OprMode m,UInt32 sample_rate,UInt16 bits,UInt32 samples,ErrFunc erf);
 
513
extern void WavReadOverrides(WAVFILE *wfile,WavPlayOpts *wavopts);
 
514
extern int WavClose(WAVFILE *wfile,ErrFunc erf);
 
515
 
 
516
extern DSPFILE *OpenDSP(WAVFILE *wfile,int omode,ErrFunc erf);
 
517
extern int PlayDSP(DSPFILE *dfile,WAVFILE *wfile,DSPPROC work_proc,ErrFunc erf);
 
518
extern int RecordDSP(DSPFILE *dfile,WAVFILE *wfile,UInt32 samples,DSPPROC work_proc,ErrFunc erf);
 
519
extern int CloseDSP(DSPFILE *dfile,ErrFunc erf);
 
520
 
 
521
extern int recplay(WavPlayOpts *wavopts,char **argv,ErrFunc erf);
 
522
/*/extern int wavplay(WavPlayOpts *wavopts,char *argv,ErrFunc erf);*/
 
523
extern int wavplay(char *argv,ErrFunc erf);
 
524
extern int wavrecd(WavPlayOpts *wavopts,char *Pathname,ErrFunc erf);
 
525
 
 
526
extern void RegisterSigHandlers(void);
 
527
 
 
528
/*/extern void play(char *Pathname);*/
 
529
 
 
530
#endif /* _wavplay_h_ */
 
531
 
 
532
 
 
533
 
 
534
 
 
535
/* $Source: /cvsroot/qgo/qgo/src/wavplay.h,v $ */