Clarify error message when file cannot be created,

The default error is "Not a valid SNDFILE* pointer." which is rather
obscure to end-users.
This commit is contained in:
Robin Gareus 2018-07-25 17:46:15 +02:00
parent 203c6546c1
commit 16ef78ade0

View file

@ -84,6 +84,10 @@ class SndfileWriter
virtual void init()
{
if (SF_ERR_NO_ERROR != SndfileHandle::error ()) {
throw Exception (*this, boost::str (boost::format
("Could create output file (%1%)") % path));
}
samples_written = 0;
add_supported_flag (ProcessContext<T>::EndOfInput);
}