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) {
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 ();
}
#include <ardour/analyser.h>
#ifdef HAVE_COREAUDIO
-#ifdef USE_COREAUDIO_FOR_FILE_IO
#include <ardour/caimportable.h>
#endif
-#endif
#include "i18n.h"
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);
catch (...) {
/* fall back to SndFile */
-#endif
#endif
try {
}
#ifdef HAVE_COREAUDIO
-#ifdef USE_COREAUDIO_FOR_FILE_IO
}
#endif
-#endif
}
static std::string