13
0

Revert erroneous commit 12922 and replace with a better fix

(should fix #4947, #4963, #4987).


git-svn-id: svn://localhost/ardour2/branches/3.0@12986 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2012-07-04 19:56:14 +00:00
parent d762be4f73
commit e35a84a32b
2 changed files with 11 additions and 8 deletions

View File

@ -722,6 +722,13 @@ MidiTrack::act_on_mute ()
XXX we should should also stop all relevant note trackers.
*/
/* If we haven't got a diskstream yet, there's nothing to worry about,
and we can't call get_channel_mask() anyway.
*/
if (!midi_diskstream()) {
return;
}
if (muted()) {
/* only send messages for channels we are using */

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,10 +133,6 @@ 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());
}