capitalized menus. minor header fix
[ardour.git] / libs / ardour / ardour / sndfile_helpers.h
1 #ifndef __sndfile_helpers_h__
2 #define __sndfile_helpers_h__
3
4 #include <string>
5 #include <stdint.h>
6
7 using std::string;
8
9 // Use this define when initializing arrarys for use in sndfile_*_format()
10 #define SNDFILE_STR_LENGTH 32
11
12 #define SNDFILE_HEADER_FORMATS 7
13 extern const char * const sndfile_header_formats_strings[SNDFILE_HEADER_FORMATS+1];
14 extern const char * const sndfile_file_endings_strings[SNDFILE_HEADER_FORMATS+1];
15
16 extern int sndfile_header_formats[SNDFILE_HEADER_FORMATS];
17
18 #define SNDFILE_BITDEPTH_FORMATS 5
19 extern const char * const sndfile_bitdepth_formats_strings[SNDFILE_BITDEPTH_FORMATS+1];
20
21 extern int sndfile_bitdepth_formats[SNDFILE_BITDEPTH_FORMATS];
22
23 #define SNDFILE_ENDIAN_FORMATS 2
24 extern const char * const sndfile_endian_formats_strings[SNDFILE_ENDIAN_FORMATS+1];
25
26 extern int sndfile_endian_formats[SNDFILE_ENDIAN_FORMATS];
27
28 int sndfile_bitdepth_format_from_string(string);
29 int sndfile_header_format_from_string(string);
30 int sndfile_endian_format_from_string(string);
31 string sndfile_file_ending_from_string(string);
32
33 int sndfile_data_width (int format);
34
35 // It'd be nice if libsndfile did this for us
36 string sndfile_major_format(int);
37 string sndfile_minor_format(int);
38
39 struct SoundFileInfo {
40         float    samplerate;
41         uint16_t channels;
42         int64_t length;
43         std::string format_name;
44 };
45
46 bool get_soundfile_info (string path, SoundFileInfo& _info);
47
48 #endif /* __sndfile_helpers_h__ */