summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/sndfilesource.cc10
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