}
+SoundAssetWriter::~SoundAssetWriter()
+{
+ try {
+ /* Last-resort finalization to close the file, at least */
+ if (_started) {
+ _state->mxf_writer.Finalize();
+ }
+ } catch (...) {}
+}
+
+
void
SoundAssetWriter::start ()
{
if (ASDCP_FAILURE(r)) {
boost::throw_exception (MiscError(String::compose ("could not finalise audio MXF (%1)", static_cast<int>(r))));
}
+ _started = false;
}
_asset->_intrinsic_duration = _frames_written;