Partially sync files.el from XEmacs 21.5 for wildcard support.
[sxemacs] / src / media / media-sox.h
1 /* media-sox.h - analyse audio files or streams via sox
2
3    Copyright (C) 2006 Sebastian Freundt
4
5 This file is part of SXEmacs
6
7 SXEmacs is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 SXEmacs is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
19
20
21 /* Synched up with: Not in FSF. */
22
23 #ifndef INCLUDED_media_sox_h_
24 #define INCLUDED_media_sox_h_
25
26 #if defined HAVE_SOX_H
27 # include <sox.h>
28 #else
29 # error "How on earth did you get here?"
30 #endif
31
32 #if defined HAVE_SOX_FORMAT_T
33 # define sxe_sox_t      sox_format_t*
34 #else
35 # error "How could you ever reach this?"
36 #endif
37
38 #if defined HAVE_SOX_SIGNALINFO_T
39 # define sxe_sox_signalinfo_t   sox_signalinfo_t
40 #else
41 # error "Congrats! Y0u won 6 packs of V|AGRA! Go and have fun!"
42 #endif
43
44 #if defined HAVE_SOX_SSIZE_T
45 # define sxe_sox_ssize_t        sox_ssize_t
46 #else
47 # define sxe_sox_ssize_t        size_t
48 #endif
49
50 #if defined HAVE_SOX_SAMPLE_T
51 # define sxe_sox_sample_t       sox_sample_t
52 #else
53 # error "Thou nutter!  Serves thee right!"
54 #endif
55
56 #if defined HAVE_SOX_H
57 # define sxe_sox_open_read      sox_open_read
58 # define sxe_sox_close          sox_close
59 # define sxe_sox_read           sox_read
60 # define sxe_sox_seek           sox_seek
61 #else
62 # error "Nope! I'm upset now.  Gimme a pint or another to cheer me up!"
63 #endif
64
65 #include "media.h"
66
67 #if defined SOX_SIZE_BYTE &&                    \
68         defined SOX_SIZE_8BIT &&                \
69         defined SOX_SIZE_16BIT &&               \
70         defined SOX_SIZE_24BIT &&               \
71         defined SOX_SIZE_32BIT &&               \
72         defined SOX_SIZE_64BIT
73 # define SXE_SIZE_BYTE          SOX_SIZE_BYTE
74 # define SXE_SIZE_8BIT          SOX_SIZE_8BIT
75 # define SXE_SIZE_16BIT         SOX_SIZE_16BIT
76 # define SXE_SIZE_24BIT         SOX_SIZE_24BIT
77 # define SXE_SIZE_32BIT         SOX_SIZE_32BIT
78 # define SXE_SIZE_64BIT         SOX_SIZE_64BIT
79 #elif defined HAVE_SOX_SIGNALINFO_T_PRECISION
80 /* we don't need this bugger at all */
81 #else
82 # error "Guess what, I will compile myself as rootkit! It's too boring with you"
83 #endif
84
85 void cleanup(void);
86
87 extern Lisp_Object Qsox;
88
89 DECLARE_MEDIA_DRIVER(media_sox);
90
91 #endif  /* INCLUDED_media_sox_h_ */