From 27747a6ee29ce8877f3bc736732379011b0b0fa3 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 27 Jan 2012 17:08:39 +0000 Subject: [PATCH] fix #4443 - tape track files need to be created when opened, not when written to git-svn-id: svn://localhost/ardour2/branches/3.0@11363 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/sndfilesource.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc index ee4d976f16..3759057dc5 100644 --- a/libs/ardour/sndfilesource.cc +++ b/libs/ardour/sndfilesource.cc @@ -144,8 +144,14 @@ SndFileSource::SndFileSource (Session& s, const string& path, const string& orig _info.samplerate = rate; _info.format = fmt; - /* do not open the file here - do that in write_unlocked() as needed - */ + if (_flags & Destructive) { + if (open()) { + throw failed_constructor(); + } + } else { + /* normal mode: do not open the file here - do that in write_unlocked() as needed + */ + } } void