a real, working fix for panning regression in alpha6
[ardour.git] / libs / ardour / pannable.cc
index 6dbb5005c23a198622e28efcd9db92c4c45d5a68..ba4632f2b06a5419b939ee5c476eeb0689d63b49 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() == X_("azimuth")) {
+                               prop = (*niter)->property (X_("value"));
+                               if (prop) {
+                                       pan_azimuth_control->set_value (atof (prop->value()));
+                               }
+                       } else if ((*niter)->name() == X_("width")) {
+                               prop = (*niter)->property (X_("value"));
+                               if (prop) {
+                                       pan_width_control->set_value (atof (prop->value()));
+                               }
+                       } else if ((*niter)->name() == X_("elevation")) {
+                               prop = (*niter)->property (X_("value"));
+                               if (prop) {
+                                       pan_elevation_control->set_value (atof (prop->value()));
+                               }
+                       } else if ((*niter)->name() == X_("frontback")) {
+                               prop = (*niter)->property (X_("value"));
+                               if (prop) {
+                                       pan_frontback_control->set_value (atof (prop->value()));
+                               }
+                       } else if ((*niter)->name() == X_("lfe")) {
+                               prop = (*niter)->property (X_("value"));
+                               if (prop) {
+                                       pan_lfe_control->set_value (atof (prop->value()));
+                               }
+                       }
                }
        }