X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fpannable.cc;h=92e91f53c1d2068e7574360619103d6c6dd82f8a;hb=9cb678ebcc2ca0c7993bdd182c9e6ad1f8adf09a;hp=6dbb5005c23a198622e28efcd9db92c4c45d5a68;hpb=5afe60f0e3e726dbf3bb13944d723a86a3cfde0d;p=ardour.git diff --git a/libs/ardour/pannable.cc b/libs/ardour/pannable.cc index 6dbb5005c2..92e91f53c1 100644 --- a/libs/ardour/pannable.cc +++ b/libs/ardour/pannable.cc @@ -20,6 +20,7 @@ #include "pbd/error.h" #include "pbd/convert.h" #include "pbd/compose.h" +#include "pbd/boost_debug.h" #include "ardour/debug.h" #include "ardour/automation_control.h" @@ -48,6 +49,8 @@ Pannable::Pannable (Session& s) , _has_state (false) , _responding_to_control_auto_state_change (0) { + //boost_debug_shared_ptr_mark_interesting (this, "pannable"); + add_control (pan_azimuth_control); add_control (pan_elevation_control); add_control (pan_width_control); @@ -182,7 +185,7 @@ Pannable::get_state () } XMLNode& -Pannable::state (bool full) +Pannable::state (bool /*full*/) { XMLNode* node = new XMLNode (X_("Pannable")); @@ -230,6 +233,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())); + } + } } }