diff options
author | Carl Hetherington <carl@carlh.net> | 2012-06-25 12:39:25 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-06-25 12:39:25 +0000 |
commit | f2f35e50a0e2d6e0b2c7f02b5e6c76e82643c80a (patch) | |
tree | af7f78c69be98d10709ba83c852c5db17035a6da /libs | |
parent | 92469df6ab3417c6d953f0b51766d42d71a230af (diff) |
Create diskstream before calling Route::set_state, the
set_state causes muted MIDI tracks to look up their
diskstream (#4947).
git-svn-id: svn://localhost/ardour2/branches/3.0@12922 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/track.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc index 1c45460088..7f307f3edc 100644 --- a/libs/ardour/track.cc +++ b/libs/ardour/track.cc @@ -119,12 +119,12 @@ Track::state (bool full) int Track::set_state (const XMLNode& node, int version) { - if (Route::set_state (node, version)) { - return -1; - } - XMLNode* child; + /* Create the diskstream before calling Route::set_state, as MidiTrack + needs it if the track is muted (it ends up calling MidiTrack::get_channel_mask) + */ + if (version >= 3000) { if ((child = find_named_node (node, X_("Diskstream"))) != 0) { boost::shared_ptr<Diskstream> ds = diskstream_factory (*child); @@ -133,6 +133,10 @@ Track::set_state (const XMLNode& node, int version) } } + if (Route::set_state (node, version)) { + return -1; + } + if (_diskstream) { _diskstream->playlist()->set_orig_track_id (id()); } |