Mercurial > hg > xemacs-beta
comparison src/miscplay.h @ 398:74fd4e045ea6 r21-2-29
Import from CVS: tag r21-2-29
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:13:30 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
397:f4aeb21a5bad | 398:74fd4e045ea6 |
---|---|
1 /* miscplay.h - general routines related to playing sounds | |
2 ** | |
3 ** Copyright (C) 1995,96 by Markus Gutschke (gutschk@math.uni-muenster.de) | |
4 ** This was sawed out from version 1.3 of linuxplay.c by | |
5 ** Robert Bihlmeyer <robbe@orcus.priv.at>. | |
6 ** | |
7 ** Parts of this code were inspired by sunplay.c, which is copyright 1989 by | |
8 ** Jef Poskanzer and 1991,92 by Jamie Zawinski; c.f. sunplay.c for further | |
9 ** information. | |
10 ** | |
11 ** Permission to use, copy, modify, and distribute this software and its | |
12 ** documentation for any purpose and without fee is hereby granted, provided | |
13 ** that the above copyright notice appear in all copies and that both that | |
14 ** copyright notice and this permission notice appear in supporting | |
15 ** documentation. This software is provided "as is" without express or | |
16 ** implied warranty. | |
17 */ | |
18 | |
19 #ifndef INCLUDED_miscplay_h_ | |
20 #define INCLUDED_miscplay_h_ | |
21 | |
22 #include <stdlib.h> | |
23 | |
24 #define HEADERSZ 256 /* has to be at least as big as the biggest header */ | |
25 #define SNDBUFSZ 2048 /* has to be at least as big as HEADERSZ */ | |
26 | |
27 /* Audio data formats from <linux/soundcard.h> */ | |
28 #define AFMT_MU_LAW 0x00000001 | |
29 #define AFMT_A_LAW 0x00000002 | |
30 #define AFMT_IMA_ADPCM 0x00000004 | |
31 #define AFMT_U8 0x00000008 | |
32 #define AFMT_S16_LE 0x00000010 /* Little endian signed 16*/ | |
33 #define AFMT_S16_BE 0x00000020 /* Big endian signed 16 */ | |
34 #define AFMT_S8 0x00000040 | |
35 #define AFMT_U16_LE 0x00000080 /* Little endian U16 */ | |
36 #define AFMT_U16_BE 0x00000100 /* Big endian U16 */ | |
37 #define AFMT_MPEG 0x00000200 /* MPEG (2) audio */ | |
38 | |
39 typedef enum {fmtIllegal,fmtRaw,fmtVoc,fmtWave,fmtSunAudio} fmtType; | |
40 | |
41 size_t sndcnvnop(void **data,size_t *sz,void **outbuf); | |
42 size_t sndcnv8U_2mono(void **data,size_t *sz,void **outbuf); | |
43 size_t sndcnv8S_2mono(void **data,size_t *sz,void **outbuf); | |
44 size_t sndcnv2monounsigned(void **data,size_t *sz,void **outbuf); | |
45 size_t sndcnv2unsigned(void **data,size_t *sz,void **outbuf); | |
46 size_t sndcnvULaw_2linear(void **data,size_t *sz,void **outbuf); | |
47 size_t sndcnvULaw_2mono(void **data,size_t *sz,void **outbuf); | |
48 size_t sndcnv16swap(void **data,size_t *sz,void **outbuf); | |
49 size_t sndcnv16_2monoLE(void **data,size_t *sz,void **outbuf); | |
50 size_t sndcnv16_2monoBE(void **data,size_t *sz,void **outbuf); | |
51 size_t sndcnv2byteLE(void **data,size_t *sz,void **outbuf); | |
52 size_t sndcnv2byteBE(void **data,size_t *sz,void **outbuf); | |
53 size_t sndcnv2monobyteLE(void **data,size_t *sz,void **outbuf); | |
54 size_t sndcnv2monobyteBE(void **data,size_t *sz,void **outbuf); | |
55 | |
56 fmtType analyze_format(unsigned char *format,int *fmt,int *speed, | |
57 int *tracks, | |
58 size_t (**parsesndfile)(void **,size_t *sz, | |
59 void **)); | |
60 void reset_parsestate(void); | |
61 int parse_wave_complete(void); | |
62 | |
63 #endif /* INCLUDED_miscplay_h_ */ |