diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-02-27 14:40:59 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-02-27 14:40:59 +0000 |
commit | b6776d1102d06a1119f0d3445549cf2f97b59db3 (patch) | |
tree | c53c139299d225b9ead2acc5498372b6b0bac5d5 /libs/ardour | |
parent | 3188ad3ab03fb15b430cc6dc2341a66c90a9c393 (diff) |
don't popup import progress window until we give import a chance to fail first; sndfile doesn't print open() errors if HAVE_COREAUDIO is set since we fall back to CoreAudio then
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3127 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/coreaudiosource.cc | 4 | ||||
-rw-r--r-- | libs/ardour/session.cc | 2 | ||||
-rw-r--r-- | libs/ardour/sndfilesource.cc | 8 |
3 files changed, 12 insertions, 2 deletions
diff --git a/libs/ardour/coreaudiosource.cc b/libs/ardour/coreaudiosource.cc index 011bcce337..4383f1a696 100644 --- a/libs/ardour/coreaudiosource.cc +++ b/libs/ardour/coreaudiosource.cc @@ -76,7 +76,9 @@ CoreAudioSource::init () af.SetClientFormat (client_format); } catch (CAXException& cax) { - error << string_compose ("CoreAudioSource: %1 (%2)", cax.mOperation, name()) << endmsg; + + error << string_compose(_("CoreAudioSource: cannot open file \"%1\" for %2"), + _path, (writable() ? "read+write" : "reading")) << endmsg; throw failed_constructor (); } } diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 35eb10ccf0..a084a16574 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -482,7 +482,7 @@ Session::destroy () // auditioner.reset (); -#define TRACK_DESTRUCTION +#undef TRACK_DESTRUCTION #ifdef TRACK_DESTRUCTION cerr << "delete named selections\n"; #endif /* TRACK_DESTRUCTION */ diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc index b6f3accd4e..46ccdf5e9e 100644 --- a/libs/ardour/sndfilesource.cc +++ b/libs/ardour/sndfilesource.cc @@ -218,13 +218,21 @@ SndFileSource::open () if ((sf = sf_open (_path.c_str(), (writable() ? SFM_RDWR : SFM_READ), &_info)) == 0) { char errbuf[256]; sf_error_str (0, errbuf, sizeof (errbuf) - 1); +#ifndef HAVE_COREAUDIO + /* if we have CoreAudio, we will be falling back to that if libsndfile fails, + so we don't want to see this message. + */ + error << string_compose(_("SndFileSource: cannot open file \"%1\" for %2 (%3)"), _path, (writable() ? "read+write" : "reading"), errbuf) << endmsg; +#endif return -1; } if (_channel >= _info.channels) { +#ifndef HAVE_COREAUDIO error << string_compose(_("SndFileSource: file only contains %1 channels; %2 is invalid as a channel number"), _info.channels, _channel) << endmsg; +#endif sf_close (sf); sf = 0; return -1; |