new automation state model, sort of working, but not really
[ardour.git] / libs / ardour / send.cc
index 2b72fb9bdbdf660b856949528eeb1bdc5b08045b..21069e3899cd5d4c0b43e1925712093dcf6467b3 100644 (file)
@@ -36,8 +36,7 @@ Send::Send (Session& s, Placement p)
 {
        _metering = false;
        expected_inputs = 0;
-       save_state (_("initial state"));
-        RedirectCreated (this); /* EMIT SIGNAL */
+       RedirectCreated (this); /* EMIT SIGNAL */
 }
 
 Send::Send (Session& s, const XMLNode& node)
@@ -50,8 +49,7 @@ Send::Send (Session& s, const XMLNode& node)
                throw failed_constructor();
        }
 
-       save_state (_("initial state"));
-        RedirectCreated (this); /* EMIT SIGNAL */
+       RedirectCreated (this); /* EMIT SIGNAL */
 }
 
 Send::Send (const Send& other)
@@ -59,13 +57,13 @@ Send::Send (const Send& other)
 {
        _metering = false;
        expected_inputs = 0;
-       save_state (_("initial state"));
+
        RedirectCreated (this); /* EMIT SIGNAL */
 }
 
 Send::~Send ()
 {
-       GoingAway (this);
+       GoingAway ();
 }
 
 XMLNode&
@@ -78,7 +76,7 @@ XMLNode&
 Send::state(bool full)
 {
        XMLNode *node = new XMLNode("Send");
-       node->add_child_nocopy (Redirect::state(full));
+       node->add_child_nocopy (Redirect::state (full));
        return *node;
 }
 
@@ -87,11 +85,15 @@ Send::set_state(const XMLNode& node)
 {
        XMLNodeList nlist = node.children();
        XMLNodeIterator niter;
-       
+
+       /* Send has regular IO automation (gain, pan) */
+
        for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
                if ((*niter)->name() == Redirect::state_node_name) {
                        Redirect::set_state (**niter);
                        break;
+               } else if ((*niter)->name() == X_("Automation")) {
+                       IO::set_automation_state (*(*niter));
                }
        }
 
@@ -104,7 +106,7 @@ Send::set_state(const XMLNode& node)
 }
 
 void
-Send::run (vector<Sample *>& bufs, uint32_t nbufs, jack_nframes_t nframes, jack_nframes_t offset)
+Send::run (vector<Sample *>& bufs, uint32_t nbufs, nframes_t nframes, nframes_t offset)
 {
        if (active()) {