Remove #ifdef'ed format-specific error-log messages

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.
This commit is contained in:
Robin Gareus 2019-12-07 15:09:20 +01:00
parent 9040fd4670
commit c7c40f6f3d
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
3 changed files with 1 additions and 15 deletions

View 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 ();
}
}

View 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;
}

View 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) {