#include <map>
+#include <vector>
+#include <pbd/convert.h>
+
+#include <sndfile.h>
#include <ardour/sndfile_helpers.h>
#include "i18n.h"
using std::map;
+using namespace std;
const char * const sndfile_header_formats_strings[SNDFILE_HEADER_FORMATS+1] = {
N_("WAV"),
0
};
+const char* const sndfile_file_endings_strings[SNDFILE_HEADER_FORMATS+1] = {
+ N_(".wav"),
+ N_(".aiff"),
+ N_(".raw"),
+ N_(".paf"),
+ N_(".au"),
+ N_(".ircam"),
+ N_(".w64"),
+ 0
+};
+
int sndfile_header_formats[SNDFILE_HEADER_FORMATS] = {
SF_FORMAT_WAV,
SF_FORMAT_AIFF,
return -1;
}
+string
+sndfile_file_ending_from_string (string str)
+{
+ static vector<string> file_endings;
+
+ if (file_endings.empty()) {
+ file_endings = I18N((const char **) sndfile_file_endings_strings);
+ }
+
+ for (int n = 0; sndfile_header_formats_strings[n]; ++n) {
+ if (str == sndfile_header_formats_strings[n]) {
+ return file_endings[n];
+ }
+ }
+ return 0;
+}
+
int
sndfile_data_width (int format)
{
return "-Unknown-";
}
}
+