sfdb displays file info.
[ardour.git] / libs / ardour / ardour / sndfile_helpers.h
1 #ifndef __sndfile_helpers_h__
2 #define __sndfile_helpers_h__
3
4 #include <string>
5
6 using std::string;
7
8 // Use this define when initializing arrarys for use in sndfile_*_format()
9 #define SNDFILE_STR_LENGTH 32
10
11 #define SNDFILE_HEADER_FORMATS 7
12 extern const char * const sndfile_header_formats_strings[SNDFILE_HEADER_FORMATS+1];
13
14 extern int sndfile_header_formats[SNDFILE_HEADER_FORMATS];
15
16 #define SNDFILE_BITDEPTH_FORMATS 5
17 extern const char * const sndfile_bitdepth_formats_strings[SNDFILE_BITDEPTH_FORMATS+1];
18
19 extern int sndfile_bitdepth_formats[SNDFILE_BITDEPTH_FORMATS];
20
21 #define SNDFILE_ENDIAN_FORMATS 2
22 extern const char * const sndfile_endian_formats_strings[SNDFILE_ENDIAN_FORMATS+1];
23
24 extern int sndfile_endian_formats[SNDFILE_ENDIAN_FORMATS];
25
26 int sndfile_bitdepth_format_from_string(string);
27 int sndfile_header_format_from_string(string);
28 int sndfile_endian_format_from_string(string);
29
30 int sndfile_data_width (int format);
31
32 // It'd be nice if libsndfile did this for us
33 string sndfile_major_format(int);
34 string sndfile_minor_format(int);
35
36 #endif /* __sndfile_helpers_h__ */