Remove #ifdef'ed format-specific error-log messages
authorRobin Gareus <robin@gareus.org>
Sat, 7 Dec 2019 14:09:20 +0000 (15:09 +0100)
committerRobin Gareus <robin@gareus.org>
Sat, 7 Dec 2019 14:38:53 +0000 (15:38 +0100)
With inclusion of Mp3FileSource, this would get tricky.
On MacOS, the SndFileSource's sf_error_str message is never displayed,
anyway, also calling methods all handle failed-constructor.
So error-log is less important.

libs/ardour/coreaudiosource.cc
libs/ardour/sndfilesource.cc
libs/ardour/source_factory.cc

index c1a5e07c803367543314a8b8b55b1c4f5b0bd7f1..ee1e6df7020613f563a686876f169ea8d2d0c389 100644 (file)
@@ -99,9 +99,6 @@ CoreAudioSource::init_cafile ()
                af.SetClientFormat (client_format);
 
        } catch (CAXException& cax) {
-
-               error << string_compose(_("CoreAudioSource: cannot open file \"%1\" for %2"),
-                                       _path, (writable() ? "read+write" : "reading")) << endmsg;
                throw failed_constructor ();
        }
 }
index a14f0e1c72d211dd01d3fb32f19510432186a3aa..f878796198bcf9efd8b7b55ef97af797f7c7d65c 100644 (file)
@@ -405,18 +405,6 @@ SndFileSource::open ()
        }
 
        if (_sndfile == 0) {
-               char errbuf[1024];
-               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.
-               */
-
-                cerr << "failed to open " << _path << " with name " << _name << endl;
-
-               error << string_compose(_("SndFileSource: cannot open file \"%1\" for %2 (%3)"),
-                                       _path, (writable() ? "read+write" : "reading"), errbuf) << endmsg;
-#endif
                return -1;
        }
 
index c783544eb174cd1fdc2a964e173a9e0410b1afdf..051f7c063c96490a779cbdc658aa324995223b14 100644 (file)
@@ -295,6 +295,7 @@ SourceFactory::createExternal (DataType type, Session& s, const string& path,
                        // eh?
                }
 
+               error << string_compose(_("AudioFileSource: cannot open file \"%1\" "), path) << endmsg;
                throw failed_constructor ();
 
        } else if (type == DataType::MIDI) {