diff data/fileio/WavFileReader.cpp @ 783:459235dccff6

Add ogg to supported file extensions if oga is found
author Chris Cannam
date Thu, 28 Mar 2013 10:01:55 +0000
parents 1424aa29ae95
children f0558e69a074
line wrap: on
line diff
--- a/data/fileio/WavFileReader.cpp	Wed Mar 27 16:53:31 2013 +0000
+++ b/data/fileio/WavFileReader.cpp	Thu Mar 28 10:01:55 2013 +0000
@@ -185,7 +185,14 @@
     for (int i = 0; i < count; ++i) {
         info.format = i;
         if (!sf_command(0, SFC_GET_FORMAT_MAJOR, &info, sizeof(info))) {
-            extensions.insert(QString(info.extension).toLower());
+            QString ext = QString(info.extension).toLower();
+            extensions.insert(ext);
+            if (ext == "oga") {
+                // libsndfile is awfully proper, it says it only
+                // supports .oga but lots of Ogg audio files in the
+                // wild are .ogg and it will accept that
+                extensions.insert("ogg");
+            }
         }
     }
 }