2 Copyright (C) 2000-2007 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __sndfile_helpers_h__
21 #define __sndfile_helpers_h__
28 // Use this define when initializing arrarys for use in sndfile_*_format()
29 #define SNDFILE_STR_LENGTH 32
31 #define SNDFILE_HEADER_FORMATS 7
32 extern const char * const sndfile_header_formats_strings[SNDFILE_HEADER_FORMATS+1];
33 extern const char * const sndfile_file_endings_strings[SNDFILE_HEADER_FORMATS+1];
35 extern int sndfile_header_formats[SNDFILE_HEADER_FORMATS];
37 #define SNDFILE_BITDEPTH_FORMATS 5
38 extern const char * const sndfile_bitdepth_formats_strings[SNDFILE_BITDEPTH_FORMATS+1];
40 extern int sndfile_bitdepth_formats[SNDFILE_BITDEPTH_FORMATS];
42 #define SNDFILE_ENDIAN_FORMATS 2
43 extern const char * const sndfile_endian_formats_strings[SNDFILE_ENDIAN_FORMATS+1];
45 extern int sndfile_endian_formats[SNDFILE_ENDIAN_FORMATS];
47 int sndfile_bitdepth_format_from_string(string);
48 int sndfile_header_format_from_string(string);
49 int sndfile_endian_format_from_string(string);
50 string sndfile_file_ending_from_string(string);
52 int sndfile_data_width (int format);
54 // It'd be nice if libsndfile did this for us
55 string sndfile_major_format(int);
56 string sndfile_minor_format(int);
58 #endif /* __sndfile_helpers_h__ */