5d5950bc4d93 — Chris Cannam tip a month ago
Leave .caf files to the CoreAudio reader (where they are native) if available
2 files changed, 10 insertions(+), 1 deletions(-)

M src/CoreAudioReadStream.cpp
M src/WavFileReadStream.cpp
M src/CoreAudioReadStream.cpp +1 -0
@@ 70,6 70,7 @@ getCoreAudioExtensions()
     extensions.push_back("mp3");
     extensions.push_back("mp4");
     extensions.push_back("wav");
+    extensions.push_back("caf");
     return extensions;
 }
 

          
M src/WavFileReadStream.cpp +9 -1
@@ 60,7 60,15 @@ getWavReaderExtensions()
     for (int i = 0; i < count; ++i) {
         info.format = i;
         if (!sf_command(0, SFC_GET_FORMAT_MAJOR, &info, sizeof(info))) {
-            extensions.push_back(std::string(info.extension));
+            std::string ext(info.extension);
+#ifdef HAVE_COREAUDIO
+            // CAF is the CoreAudio file format, leave it for the
+            // native reader
+            if (ext == "caf") {
+                continue;
+            }
+#endif
+            extensions.push_back(ext);
         }
     }