summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorBen Loftis <ben@glw.com>2010-02-17 19:13:21 +0000
committerBen Loftis <ben@glw.com>2010-02-17 19:13:21 +0000
commit9bd4251e868a41afa48430b9f95895770e808822 (patch)
treee912803b09a198d890abdb4a8e7f761abd863571 /libs
parentd3573785fca1aa564a19503e201c1eed1ef591d9 (diff)
turn CoreAudio file support back on, and tweak file list. needs more testing
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@6693 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/audiofilesource.cc37
-rw-r--r--libs/ardour/caimportable.cc5
-rw-r--r--libs/ardour/import.cc8
3 files changed, 31 insertions, 19 deletions
diff --git a/libs/ardour/audiofilesource.cc b/libs/ardour/audiofilesource.cc
index b1ec8a3baa..302f263feb 100644
--- a/libs/ardour/audiofilesource.cc
+++ b/libs/ardour/audiofilesource.cc
@@ -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) {
diff --git a/libs/ardour/caimportable.cc b/libs/ardour/caimportable.cc
index 229bfa8809..272e6bda49 100644
--- a/libs/ardour/caimportable.cc
+++ b/libs/ardour/caimportable.cc
@@ -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 ();
}
diff --git a/libs/ardour/import.cc b/libs/ardour/import.cc
index 30bcaa891a..b53fafa5f9 100644
--- a/libs/ardour/import.cc
+++ b/libs/ardour/import.cc
@@ -50,10 +50,8 @@
#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