summaryrefslogtreecommitdiff
path: root/libs/audiographer
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2018-07-25 17:46:15 +0200
committerRobin Gareus <robin@gareus.org>2018-07-25 17:46:15 +0200
commit16ef78ade0faf1cbdbdb2dc6c4430fb4996c0323 (patch)
treedccd869a47c0861c535bca71bccd936119199661 /libs/audiographer
parent203c6546c198053c3a5fc93a6c515424b22e465c (diff)
Clarify error message when file cannot be created,
The default error is "Not a valid SNDFILE* pointer." which is rather obscure to end-users.
Diffstat (limited to 'libs/audiographer')
-rw-r--r--libs/audiographer/audiographer/sndfile/sndfile_writer.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/audiographer/audiographer/sndfile/sndfile_writer.h b/libs/audiographer/audiographer/sndfile/sndfile_writer.h
index d0049360d2..b106eba6a8 100644
--- a/libs/audiographer/audiographer/sndfile/sndfile_writer.h
+++ b/libs/audiographer/audiographer/sndfile/sndfile_writer.h
@@ -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);
}