ardour
sndfile_helpers.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2000-2007 Paul Davis
3 
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.
8 
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.
13 
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.
17 
18 */
19 
20 #ifndef __sndfile_helpers_h__
21 #define __sndfile_helpers_h__
22 
23 #include <string>
24 #include <stdint.h>
25 
26 #include "ardour/types.h"
27 
28 // Use this define when initializing arrarys for use in sndfile_*_format()
29 #define SNDFILE_STR_LENGTH 32
30 
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];
34 
36 
37 #define SNDFILE_BITDEPTH_FORMATS 5
39 
41 
42 #define SNDFILE_ENDIAN_FORMATS 2
43 extern const char * const sndfile_endian_formats_strings[SNDFILE_ENDIAN_FORMATS+1];
44 
46 
50 
51 int sndfile_data_width (int format);
52 
53 // It'd be nice if libsndfile did this for us
54 std::string sndfile_major_format (int);
55 std::string sndfile_minor_format (int);
56 
57 #endif /* __sndfile_helpers_h__ */
#define SNDFILE_HEADER_FORMATS
const char *const sndfile_header_formats_strings[SNDFILE_HEADER_FORMATS+1]
std::string sndfile_minor_format(int)
std::string sndfile_major_format(int)
const char *const sndfile_file_endings_strings[SNDFILE_HEADER_FORMATS+1]
int sndfile_endian_formats[SNDFILE_ENDIAN_FORMATS]
int sndfile_header_formats[SNDFILE_HEADER_FORMATS]
int sndfile_endian_format_by_index(int)
const char *const sndfile_endian_formats_strings[SNDFILE_ENDIAN_FORMATS+1]
int sndfile_header_format_by_index(int)
int sndfile_bitdepth_format_by_index(int)
const char *const sndfile_bitdepth_formats_strings[SNDFILE_BITDEPTH_FORMATS+1]
#define SNDFILE_BITDEPTH_FORMATS
#define SNDFILE_ENDIAN_FORMATS
int sndfile_data_width(int format)
int sndfile_bitdepth_formats[SNDFILE_BITDEPTH_FORMATS]