changeset 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 cf466a5d411e
children 8e8d0f1f4f85 05ba4bbd2b87
files data/fileio/WavFileReader.cpp
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
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");
+            }
         }
     }
 }