summaryrefslogtreecommitdiff
path: root/libs/ardour/sndfile_helpers.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-04-15 20:42:05 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-04-15 20:42:05 +0000
commitdc815ea8e84d28fc01a68225c2ece4399c4a9c7e (patch)
tree27954a7b74ea3df1ca87d0ece20ad15a6f46f6be /libs/ardour/sndfile_helpers.cc
parentd2beb38ea9fb39dbfb8667784bd248b32d171cbf (diff)
forward-port from 2.X commits 5827-6000 including
git-svn-id: svn://localhost/ardour2/branches/3.0@6914 d708f5d6-7413-0410-9779-e7cbd77b26cf
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;
+ }
}
}