open external [read-only] midi-files on construction
This commit is contained in:
parent
eb853b79c4
commit
9e799c6146
@ -66,6 +66,15 @@ SMFSource::SMFSource (Session& s, const string& path, Source::Flag flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* file is not opened until write */
|
/* 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. */
|
/** Constructor used for existing internal-to-session files. */
|
||||||
|
Loading…
Reference in New Issue
Block a user