turn CoreAudio file support back on, and tweak file list. needs more testing
authorBen Loftis <ben@glw.com>
Wed, 17 Feb 2010 19:13:21 +0000 (19:13 +0000)
committerBen Loftis <ben@glw.com>
Wed, 17 Feb 2010 19:13:21 +0000 (19:13 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@6693 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/audiofilesource.cc
libs/ardour/caimportable.cc
libs/ardour/import.cc

index b1ec8a3baa7c543b5a283c5f344b2bf3d982d49d..302f263feb0ea8b8a2804f4568c87f0f69c4f05f 100644 (file)
@@ -720,28 +720,43 @@ bool
 AudioFileSource::safe_file_extension(ustring file)
 {
        const char* suffixes[] = {
-               ".wav", ".WAV",
-               ".aiff", ".AIFF",
-               ".caf", ".CAF",
                ".aif", ".AIF",
+               ".aifc", ".AIFC",
+               ".aiff", ".AIFF",
                ".amb", ".AMB",
-               ".snd", ".SND",
                ".au", ".AU",
-               ".raw", ".RAW",
-               ".sf", ".SF",
+               ".caf", ".CAF",
                ".cdr", ".CDR",
+               ".flac", ".FLAC",
+               ".htk", ".HTK",
+               ".iff", ".IFF",
+               ".mat", ".MAT",
+               ".oga", ".OGA",
+               ".ogg", ".OGG",
+               ".paf", ".PAF",
+               ".pvf", ".PVF",
+               ".sf", ".SF",
                ".smp", ".SMP",
+               ".snd", ".SND",
                ".maud", ".MAUD",
+               ".voc", ".VOC"
                ".vwe", ".VWE",
-               ".paf",
-               ".flac", ".FLAC",
-               ".ogg", ".OGG",
+               ".w64", ".W64",
+               ".wav", ".WAV",
 #ifdef HAVE_COREAUDIO
-               ".mp3", ".MP3",
                ".aac", ".AAC",
+               ".adts", ".ADTS",
+               ".ac3", ".AC3",
+               ".amr", ".AMR",
+               ".mpa", ".MPA",
+               ".mpeg", ".MPEG",
+               ".mp1", ".MP1",
+               ".mp2", ".MP2",
+               ".mp3", ".MP3",
                ".mp4", ".MP4",
+               ".m4a", ".M4A",
+               ".sd2", ".SD2",         // libsndfile supports sd2 also, but the resource fork is required to open.
 #endif // HAVE_COREAUDIO
-               ".voc", ".VOC"
        };
 
        for (size_t n = 0; n < sizeof(suffixes)/sizeof(suffixes[0]); ++n) {
index 229bfa8809a314d66e6ef9e162076d13dded6f20..272e6bda493a0b4c438ae21a6652f0ccdf27016d 100644 (file)
@@ -24,7 +24,10 @@ CAImportableSource::CAImportableSource (const string& path)
                af.SetClientFormat (client_format);
 
        } catch (CAXException& cax) {
-               error << string_compose ("CAImportable: %1", cax.mOperation) << endmsg;
+               //Don't report an error here since there is one higher up in import.
+               //Since libsndfile gets tried second, any failures here may show as
+               //invalid errors in the Error log.
+               //error << string_compose ("CAImportable: %1", cax.mOperation) << endmsg;
                throw failed_constructor ();
        }
 
index 30bcaa891af99f749fee36a4edc63bbad29c6b92..b53fafa5f9e5e24e058590fb76c77583fd713a8e 100644 (file)
 #include <ardour/analyser.h>
 
 #ifdef HAVE_COREAUDIO
-#ifdef USE_COREAUDIO_FOR_FILE_IO
 #include <ardour/caimportable.h>
 #endif
-#endif
 
 #include "i18n.h"
 
@@ -65,10 +63,9 @@ static boost::shared_ptr<ImportableSource>
 open_importable_source (const string& path, nframes_t samplerate, ARDOUR::SrcQuality quality)
 {
 #ifdef HAVE_COREAUDIO
-#ifdef USE_COREAUDIO_FOR_FILE_IO
 
        /* see if we can use CoreAudio to handle the IO */
-       
+
        try { 
                CAImportableSource* src = new CAImportableSource(path);
                boost::shared_ptr<CAImportableSource> source (src);
@@ -85,7 +82,6 @@ open_importable_source (const string& path, nframes_t samplerate, ARDOUR::SrcQua
        catch (...) {
 
                /* fall back to SndFile */
-#endif 
 #endif
 
                try { 
@@ -105,10 +101,8 @@ open_importable_source (const string& path, nframes_t samplerate, ARDOUR::SrcQua
                }
                
 #ifdef HAVE_COREAUDIO          
-#ifdef USE_COREAUDIO_FOR_FILE_IO
        }
 #endif
-#endif
 }
 
 static std::string