13
0

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
This commit is contained in:
Carl Hetherington 2012-06-25 12:39:25 +00:00
parent 92469df6ab
commit f2f35e50a0

View File

@ -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());
}