Update audiographer GPL boilerplate and (C) from git log
[ardour.git] / libs / audiographer / audiographer / sndfile / sndfile_writer.h
index d0049360d27c9dc9420a14bd698bccdb4f8b6c0e..b106eba6a8efdb7fa67fd96b745ff6862d3c8020 100644 (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);
        }