summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_diskstream.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-05-08 23:45:33 +0000
committerCarl Hetherington <carl@carlh.net>2011-05-08 23:45:33 +0000
commitd7c836dc07c657efda2651435125162791c29fd4 (patch)
tree512f84c0687910776ea8c04d2bc7e70bc839e651 /libs/ardour/midi_diskstream.cc
parentd901dbccc912314b54494fab068785c188884fe4 (diff)
Ensure that empty drag-created MIDI regions get a file on disk so that there aren't missing file errors on reload (#4024).
git-svn-id: svn://localhost/ardour2/branches/3.0@9486 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/midi_diskstream.cc')
-rw-r--r--libs/ardour/midi_diskstream.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/libs/ardour/midi_diskstream.cc b/libs/ardour/midi_diskstream.cc
index 3659a2ac60..6c51958caa 100644
--- a/libs/ardour/midi_diskstream.cc
+++ b/libs/ardour/midi_diskstream.cc
@@ -1314,13 +1314,8 @@ MidiDiskstream::steal_write_sources()
{
list<boost::shared_ptr<Source> > ret;
- /* put some data on the disk, even if its just a header for an empty file.
- XXX should we not have a more direct method for doing this? Maybe not
- since we don't want to mess around with the model/disk relationship
- that the Source has to pay attention to.
- */
-
- boost::dynamic_pointer_cast<MidiSource>(_write_source)->session_saved ();
+ /* put some data on the disk, even if its just a header for an empty file */
+ boost::dynamic_pointer_cast<SMFSource> (_write_source)->ensure_disk_file ();
/* never let it go away */
_write_source->mark_nonremovable ();