diff options
author | Robin Gareus <robin@gareus.org> | 2014-01-20 13:38:28 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-01-22 15:30:09 +0100 |
commit | 9e799c61469fceee9eeb4b45d9e5eff0ec9cbb60 (patch) | |
tree | 536e5bb913af4785ce6b99dbcf818db96168f3f6 | |
parent | eb853b79c448a29ce7954fba0eb58c4c7608e034 (diff) |
open external [read-only] midi-files on construction
-rw-r--r-- | libs/ardour/smf_source.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/ardour/smf_source.cc b/libs/ardour/smf_source.cc index 830fd75fdf..3a1029fd73 100644 --- a/libs/ardour/smf_source.cc +++ b/libs/ardour/smf_source.cc @@ -66,6 +66,15 @@ SMFSource::SMFSource (Session& s, const string& path, Source::Flag flags) } /* file is not opened until write */ + + if (flags & Writable) { + return; + } + + if (open(_path)) { + throw failed_constructor (); + } + _open = true; } /** Constructor used for existing internal-to-session files. */ |