From dc815ea8e84d28fc01a68225c2ece4399c4a9c7e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 15 Apr 2010 20:42:05 +0000 Subject: forward-port from 2.X commits 5827-6000 including git-svn-id: svn://localhost/ardour2/branches/3.0@6914 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/sndfile_helpers.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libs/ardour/sndfile_helpers.cc') 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 #include #include @@ -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; + } } } -- cgit v1.2.3