diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-27 17:08:39 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-27 17:08:39 +0000 |
commit | 27747a6ee29ce8877f3bc736732379011b0b0fa3 (patch) | |
tree | a6988518d0b1416a5bc26fb8374e8e0af26d6efe /libs/ardour/sndfilesource.cc | |
parent | 33c61757fc8352fdb1280bca28b54d1adee183ff (diff) |
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
Diffstat (limited to 'libs/ardour/sndfilesource.cc')
-rw-r--r-- | libs/ardour/sndfilesource.cc | 10 |
1 files 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 |