1 /* media-sox.h - analyse audio files or streams via sox
3 Copyright (C) 2006 Sebastian Freundt
5 This file is part of SXEmacs
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.
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.
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/>. */
21 /* Synched up with: Not in FSF. */
23 #ifndef INCLUDED_media_sox_h_
24 #define INCLUDED_media_sox_h_
26 #if defined HAVE_SOX_H
29 # error "How on earth did you get here?"
32 #if defined HAVE_SOX_FORMAT_T
33 # define sxe_sox_t sox_format_t*
35 # error "How could you ever reach this?"
38 #if defined HAVE_SOX_SIGNALINFO_T
39 # define sxe_sox_signalinfo_t sox_signalinfo_t
41 # error "Congrats! Y0u won 6 packs of V|AGRA! Go and have fun!"
44 #if defined HAVE_SOX_SSIZE_T
45 # define sxe_sox_ssize_t sox_ssize_t
47 # define sxe_sox_ssize_t size_t
50 #if defined HAVE_SOX_SAMPLE_T
51 # define sxe_sox_sample_t sox_sample_t
53 # error "Thou nutter! Serves thee right!"
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
62 # error "Nope! I'm upset now. Gimme a pint or another to cheer me up!"
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 */
82 # error "Guess what, I will compile myself as rootkit! It's too boring with you"
87 extern Lisp_Object Qsox;
89 DECLARE_MEDIA_DRIVER(media_sox);
91 #endif /* INCLUDED_media_sox_h_ */