summaryrefslogtreecommitdiff
path: root/libs/ardour/audio_track.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-11-28 18:31:18 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-11-28 18:31:18 +0000
commit9b7a35cdc0d63d05d91f9deba294bcb7113a9106 (patch)
tree566657c72ba088461bdcd858402a01fab2738090 /libs/ardour/audio_track.cc
parent422309880c0448d95c7be2cec43384b604fa427c (diff)
more or less complete restoration of Controllable::_id from XML, with all that implies for MIDI bindings continuing to work across session reloads, and also that the controlled parameter is now set from Controllable::set_value() during session loading, not directly from its "own" XML value; still some funny stuff going on with Panners. This may have broken 2.X session loading in that panners may not be setup correctly
git-svn-id: svn://localhost/ardour2/branches/3.0@8117 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/audio_track.cc')
-rw-r--r--libs/ardour/audio_track.cc21
1 files changed, 13 insertions, 8 deletions
diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc
index 554c89df44..ca2291902d 100644
--- a/libs/ardour/audio_track.cc
+++ b/libs/ardour/audio_track.cc
@@ -209,6 +209,7 @@ AudioTrack::_set_state (const XMLNode& node, int version, bool call_base)
{
const XMLProperty *prop;
XMLNodeConstIterator iter;
+ XMLNode *child;
if (call_base) {
if (Route::_set_state (node, version, call_base)) {
@@ -222,9 +223,20 @@ AudioTrack::_set_state (const XMLNode& node, int version, bool call_base)
_mode = Normal;
}
+ if (version >= 3000) {
+ if ((child = find_named_node (node, X_("Diskstream"))) != 0) {
+ boost::shared_ptr<AudioDiskstream> ds (new AudioDiskstream (_session, *child));
+ ds->do_refill_with_alloc ();
+ set_diskstream (ds);
+ }
+ }
+
+ /* set rec-enable control *AFTER* setting up diskstream, because it may want to operate
+ on the diskstream as it sets its own state
+ */
+
XMLNodeList nlist;
XMLNodeConstIterator niter;
- XMLNode *child;
nlist = node.children();
for (niter = nlist.begin(); niter != nlist.end(); ++niter){
@@ -237,13 +249,6 @@ AudioTrack::_set_state (const XMLNode& node, int version, bool call_base)
}
}
- if (version >= 3000) {
- if ((child = find_named_node (node, X_("Diskstream"))) != 0) {
- boost::shared_ptr<AudioDiskstream> ds (new AudioDiskstream (_session, *child));
- ds->do_refill_with_alloc ();
- set_diskstream (ds);
- }
- }
pending_state = const_cast<XMLNode*> (&node);