reload alpha1-6 Pannable XML state so that panning of existing sessions should work...
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 13 Jun 2011 15:50:05 +0000 (15:50 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 13 Jun 2011 15:50:05 +0000 (15:50 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@9719 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/pannable.cc

index 6dbb5005c23a198622e28efcd9db92c4c45d5a68..fb890a5e341d409c5fc4c847adece87113e926d4 100644 (file)
@@ -230,6 +230,38 @@ Pannable::set_state (const XMLNode& root, int version)
 
                } else if ((*niter)->name() == Automatable::xml_node_name) {
                        set_automation_xml_state (**niter, PanAzimuthAutomation);
+
+               } else {
+                       const XMLProperty* prop;
+
+                       /* old school (alpha1-6) XML info */
+
+                       if ((*niter)->name() == pan_azimuth_control->name()) {
+                               prop = (*niter)->property (X_("value"));
+                               if (prop) {
+                                       pan_azimuth_control->set_value (atof (prop->value()));
+                               }
+                       } else if ((*niter)->name() == pan_width_control->name()) {
+                               prop = (*niter)->property (X_("value"));
+                               if (prop) {
+                                       pan_width_control->set_value (atof (prop->value()));
+                               }
+                       } else if ((*niter)->name() == pan_elevation_control->name()) {
+                               prop = (*niter)->property (X_("value"));
+                               if (prop) {
+                                       pan_elevation_control->set_value (atof (prop->value()));
+                               }
+                       } else if ((*niter)->name() == pan_frontback_control->name()) {
+                               prop = (*niter)->property (X_("value"));
+                               if (prop) {
+                                       pan_frontback_control->set_value (atof (prop->value()));
+                               }
+                       } else if ((*niter)->name() == pan_lfe_control->name()) {
+                               prop = (*niter)->property (X_("value"));
+                               if (prop) {
+                                       pan_lfe_control->set_value (atof (prop->value()));
+                               }
+                       }
                }
        }