Remove some unused PostTransport enums and renumber others.
[ardour.git] / libs / ardour / sndfile_helpers.cc
index 057efff48c4751bbc302942d93c166d37cbac831..aa54f648a56c2a98c1647b9f009991dc718ac16c 100644 (file)
@@ -17,6 +17,7 @@
 
 */
 
+#include <strings.h>
 #include <map>
 #include <vector>
 
@@ -81,7 +82,7 @@ int sndfile_bitdepth_formats[SNDFILE_BITDEPTH_FORMATS] = {
 
 const char * const sndfile_endian_formats_strings[SNDFILE_ENDIAN_FORMATS+1] = {
        N_("Little-endian (Intel)"),
-       N_("Big-endian (Mac)"),
+       N_("Big-endian (PowerPC)"),
        0
 };
 
@@ -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;
+                        }
                }
        }