summaryrefslogtreecommitdiff
path: root/libs/ardour/sndfile_helpers.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/sndfile_helpers.cc')
-rw-r--r--libs/ardour/sndfile_helpers.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/ardour/sndfile_helpers.cc b/libs/ardour/sndfile_helpers.cc
index 057efff48c..32ff48f485 100644
--- a/libs/ardour/sndfile_helpers.cc
+++ b/libs/ardour/sndfile_helpers.cc
@@ -17,6 +17,7 @@
*/
+#include <strings.h>
#include <map>
#include <vector>
@@ -177,6 +178,16 @@ sndfile_major_format(int format)
sf_command (0, SFC_GET_FORMAT_MAJOR,
&format_info, sizeof (format_info));
m[format_info.format & SF_FORMAT_TYPEMASK] = format_info.name;
+
+ /* normalize a couple of names rather than use what libsndfile gives us */
+
+ if (strncasecmp (format_info.name, "OGG", 3) == 0) {
+ m[format_info.format & SF_FORMAT_TYPEMASK] = "Ogg";
+ } else if (strncasecmp (format_info.name, "WAV", 3) == 0) {
+ m[format_info.format & SF_FORMAT_TYPEMASK] = "WAV";
+ } else {
+ m[format_info.format & SF_FORMAT_TYPEMASK] = format_info.name;
+ }
}
}