Fix broken whitespace
authorDavid Robillard <d@drobilla.net>
Thu, 2 Jun 2011 01:01:07 +0000 (01:01 +0000)
committerDavid Robillard <d@drobilla.net>
Thu, 2 Jun 2011 01:01:07 +0000 (01:01 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@9666 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/pannable.cc
libs/ardour/panner.cc
libs/ardour/panner_manager.cc
libs/ardour/panner_shell.cc

index dde2d3067c0d0073f59764cf65015e7bc105aa98..4de47fc62b29ceb6a599b03d051ce7e4f41a7b39 100644 (file)
@@ -36,31 +36,31 @@ using namespace PBD;
 using namespace ARDOUR;
 
 Pannable::Pannable (Session& s)
-        : Automatable (s)
-        , SessionHandleRef (s)
-        , pan_azimuth_control (new PanControllable (s, "", this, PanAzimuthAutomation))
-        , pan_elevation_control (new PanControllable (s, "", this, PanElevationAutomation))
-        , pan_width_control (new PanControllable (s, "", this, PanWidthAutomation))
-        , pan_frontback_control (new PanControllable (s, "", this, PanFrontBackAutomation))
-        , pan_lfe_control (new PanControllable (s, "", this, PanLFEAutomation))
-        , _auto_state (Off)
-        , _auto_style (Absolute)
-        , _has_state (false)
-        , _responding_to_control_auto_state_change (0)
+       : Automatable (s)
+       , SessionHandleRef (s)
+       , pan_azimuth_control (new PanControllable (s, "", this, PanAzimuthAutomation))
+       , pan_elevation_control (new PanControllable (s, "", this, PanElevationAutomation))
+       , pan_width_control (new PanControllable (s, "", this, PanWidthAutomation))
+       , pan_frontback_control (new PanControllable (s, "", this, PanFrontBackAutomation))
+       , pan_lfe_control (new PanControllable (s, "", this, PanLFEAutomation))
+       , _auto_state (Off)
+       , _auto_style (Absolute)
+       , _has_state (false)
+       , _responding_to_control_auto_state_change (0)
 {
-        add_control (pan_azimuth_control);
-        add_control (pan_elevation_control);
-        add_control (pan_width_control);
-        add_control (pan_frontback_control);
-        add_control (pan_lfe_control);
+       add_control (pan_azimuth_control);
+       add_control (pan_elevation_control);
+       add_control (pan_width_control);
+       add_control (pan_frontback_control);
+       add_control (pan_lfe_control);
 
-        /* all controls change state together */
+       /* all controls change state together */
 
-        pan_azimuth_control->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&Pannable::control_auto_state_changed, this, _1));
-        pan_elevation_control->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&Pannable::control_auto_state_changed, this, _1));
-        pan_width_control->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&Pannable::control_auto_state_changed, this, _1));
-        pan_frontback_control->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&Pannable::control_auto_state_changed, this, _1));
-        pan_lfe_control->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&Pannable::control_auto_state_changed, this, _1));
+       pan_azimuth_control->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&Pannable::control_auto_state_changed, this, _1));
+       pan_elevation_control->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&Pannable::control_auto_state_changed, this, _1));
+       pan_width_control->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&Pannable::control_auto_state_changed, this, _1));
+       pan_frontback_control->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&Pannable::control_auto_state_changed, this, _1));
+       pan_lfe_control->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&Pannable::control_auto_state_changed, this, _1));
 
        pan_azimuth_control->Changed.connect_same_thread (*this, boost::bind (&Pannable::value_changed, this));
        pan_elevation_control->Changed.connect_same_thread (*this, boost::bind (&Pannable::value_changed, this));
@@ -77,28 +77,28 @@ Pannable::~Pannable ()
 void
 Pannable::control_auto_state_changed (AutoState new_state)
 {
-        if (_responding_to_control_auto_state_change) {
-                return;
-        }
+       if (_responding_to_control_auto_state_change) {
+               return;
+       }
 
-        _responding_to_control_auto_state_change++;
+       _responding_to_control_auto_state_change++;
 
-        pan_azimuth_control->set_automation_state (new_state);
-        pan_width_control->set_automation_state (new_state);
-        pan_elevation_control->set_automation_state (new_state);
-        pan_frontback_control->set_automation_state (new_state);
-        pan_lfe_control->set_automation_state (new_state);
+       pan_azimuth_control->set_automation_state (new_state);
+       pan_width_control->set_automation_state (new_state);
+       pan_elevation_control->set_automation_state (new_state);
+       pan_frontback_control->set_automation_state (new_state);
+       pan_lfe_control->set_automation_state (new_state);
 
-        _responding_to_control_auto_state_change--;
+       _responding_to_control_auto_state_change--;
 
-        _auto_state = new_state;
-        automation_state_changed (new_state);  /* EMIT SIGNAL */
+       _auto_state = new_state;
+       automation_state_changed (new_state);  /* EMIT SIGNAL */
 }
 
 void
 Pannable::set_panner (boost::shared_ptr<Panner> p)
 {
-        _panner = p;
+       _panner = p;
 }
 
 void
@@ -110,172 +110,172 @@ Pannable::value_changed ()
 void
 Pannable::set_automation_state (AutoState state)
 {
-        if (state != _auto_state) {
-                _auto_state = state;
+       if (state != _auto_state) {
+               _auto_state = state;
 
-                const Controls& c (controls());
+               const Controls& c (controls());
 
-                for (Controls::const_iterator ci = c.begin(); ci != c.end(); ++ci) {
-                        boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl>(ci->second);
-                        if (ac) {
-                                ac->alist()->set_automation_state (state);
-                        }
-                }
+               for (Controls::const_iterator ci = c.begin(); ci != c.end(); ++ci) {
+                       boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl>(ci->second);
+                       if (ac) {
+                               ac->alist()->set_automation_state (state);
+                       }
+               }
 
-                session().set_dirty ();
-                automation_state_changed (_auto_state);
-        }
+               session().set_dirty ();
+               automation_state_changed (_auto_state);
+       }
 }
 
 void
 Pannable::set_automation_style (AutoStyle style)
 {
-        if (style != _auto_style) {
-                _auto_style = style;
+       if (style != _auto_style) {
+               _auto_style = style;
 
-                const Controls& c (controls());
+               const Controls& c (controls());
 
-                for (Controls::const_iterator ci = c.begin(); ci != c.end(); ++ci) {
-                        boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl>(ci->second);
-                        if (ac) {
-                                ac->alist()->set_automation_style (style);
-                        }
-                }
+               for (Controls::const_iterator ci = c.begin(); ci != c.end(); ++ci) {
+                       boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl>(ci->second);
+                       if (ac) {
+                               ac->alist()->set_automation_style (style);
+                       }
+               }
 
-                session().set_dirty ();
-                automation_style_changed ();
-        }
+               session().set_dirty ();
+               automation_style_changed ();
+       }
 }
 
 void
 Pannable::start_touch (double when)
 {
-        const Controls& c (controls());
-
-        for (Controls::const_iterator ci = c.begin(); ci != c.end(); ++ci) {
-                boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl>(ci->second);
-                if (ac) {
-                        ac->alist()->start_touch (when);
-                }
-        }
-        g_atomic_int_set (&_touching, 1);
+       const Controls& c (controls());
+
+       for (Controls::const_iterator ci = c.begin(); ci != c.end(); ++ci) {
+               boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl>(ci->second);
+               if (ac) {
+                       ac->alist()->start_touch (when);
+               }
+       }
+       g_atomic_int_set (&_touching, 1);
 }
 
 void
 Pannable::stop_touch (bool mark, double when)
 {
-        const Controls& c (controls());
-
-        for (Controls::const_iterator ci = c.begin(); ci != c.end(); ++ci) {
-                boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl>(ci->second);
-                if (ac) {
-                        ac->alist()->stop_touch (mark, when);
-                }
-        }
-        g_atomic_int_set (&_touching, 0);
+       const Controls& c (controls());
+
+       for (Controls::const_iterator ci = c.begin(); ci != c.end(); ++ci) {
+               boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl>(ci->second);
+               if (ac) {
+                       ac->alist()->stop_touch (mark, when);
+               }
+       }
+       g_atomic_int_set (&_touching, 0);
 }
 
 XMLNode&
 Pannable::get_state ()
 {
-        return state (true);
+       return state (true);
 }
 
 XMLNode&
 Pannable::state (bool full)
 {
-        XMLNode* node = new XMLNode (X_("Pannable"));
-        XMLNode* control_node;
-        char buf[32];
-
-        control_node = new XMLNode (X_("azimuth"));
-        snprintf (buf, sizeof(buf), "%.12g", pan_azimuth_control->get_value());
-        control_node->add_property (X_("value"), buf);
-        node->add_child_nocopy (*control_node);
-
-        control_node = new XMLNode (X_("width"));
-        snprintf (buf, sizeof(buf), "%.12g", pan_width_control->get_value());
-        control_node->add_property (X_("value"), buf);
-        node->add_child_nocopy (*control_node);
-
-        control_node = new XMLNode (X_("elevation"));
-        snprintf (buf, sizeof(buf), "%.12g", pan_elevation_control->get_value());
-        control_node->add_property (X_("value"), buf);
-        node->add_child_nocopy (*control_node);
-
-        control_node = new XMLNode (X_("frontback"));
-        snprintf (buf, sizeof(buf), "%.12g", pan_frontback_control->get_value());
-        control_node->add_property (X_("value"), buf);
-        node->add_child_nocopy (*control_node);
-
-        control_node = new XMLNode (X_("lfe"));
-        snprintf (buf, sizeof(buf), "%.12g", pan_lfe_control->get_value());
-        control_node->add_property (X_("value"), buf);
-        node->add_child_nocopy (*control_node);
-
-        node->add_child_nocopy (get_automation_xml_state ());
-
-     return *node;
+       XMLNode* node = new XMLNode (X_("Pannable"));
+       XMLNode* control_node;
+       char buf[32];
+
+       control_node = new XMLNode (X_("azimuth"));
+       snprintf (buf, sizeof(buf), "%.12g", pan_azimuth_control->get_value());
+       control_node->add_property (X_("value"), buf);
+       node->add_child_nocopy (*control_node);
+
+       control_node = new XMLNode (X_("width"));
+       snprintf (buf, sizeof(buf), "%.12g", pan_width_control->get_value());
+       control_node->add_property (X_("value"), buf);
+       node->add_child_nocopy (*control_node);
+
+       control_node = new XMLNode (X_("elevation"));
+       snprintf (buf, sizeof(buf), "%.12g", pan_elevation_control->get_value());
+       control_node->add_property (X_("value"), buf);
+       node->add_child_nocopy (*control_node);
+
+       control_node = new XMLNode (X_("frontback"));
+       snprintf (buf, sizeof(buf), "%.12g", pan_frontback_control->get_value());
+       control_node->add_property (X_("value"), buf);
+       node->add_child_nocopy (*control_node);
+
+       control_node = new XMLNode (X_("lfe"));
+       snprintf (buf, sizeof(buf), "%.12g", pan_lfe_control->get_value());
+       control_node->add_property (X_("value"), buf);
+       node->add_child_nocopy (*control_node);
+
+       node->add_child_nocopy (get_automation_xml_state ());
+
+       return *node;
 }
 
 int
 Pannable::set_state (const XMLNode& root, int /*version - not used*/)
 {
-        if (root.name() != X_("Pannable")) {
-                warning << string_compose (_("Pannable given XML data for %1 - ignored"), root.name()) << endmsg;
-                return -1;
-        }
+       if (root.name() != X_("Pannable")) {
+               warning << string_compose (_("Pannable given XML data for %1 - ignored"), root.name()) << endmsg;
+               return -1;
+       }
 
-        XMLNodeList nlist;
+       XMLNodeList nlist;
        XMLNodeConstIterator niter;
        const XMLProperty *prop;
 
-        nlist = root.children();
-
-        for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
-                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_("azimuth")) {
-                        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()));
-                        }
-                } else if ((*niter)->name() == Automatable::xml_node_name) {
-                        set_automation_xml_state (**niter, PanAzimuthAutomation);
-                }
-        }
-
-        _has_state = true;
-
-        return 0;
+       nlist = root.children();
+
+       for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
+               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_("azimuth")) {
+                       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()));
+                       }
+               } else if ((*niter)->name() == Automatable::xml_node_name) {
+                       set_automation_xml_state (**niter, PanAzimuthAutomation);
+               }
+       }
+
+       _has_state = true;
+
+       return 0;
 }
 
 string
 Pannable::value_as_string (boost::shared_ptr<AutomationControl> ac) const
 {
-        boost::shared_ptr<Panner> p = panner ();
+       boost::shared_ptr<Panner> p = panner ();
 
-        if (p) {
-                return p->value_as_string (ac);
-        }
+       if (p) {
+               return p->value_as_string (ac);
+       }
 
-        return Automatable::value_as_string (ac);
+       return Automatable::value_as_string (ac);
 }
index 7b0726770ae22d081deb3bb93751e7e48bd3601d..b6e585b254f917b5647782a40c496507b601d0d8 100644 (file)
@@ -38,7 +38,7 @@ Panner::Panner (boost::shared_ptr<Pannable> p)
 
 Panner::~Panner ()
 {
-        DEBUG_TRACE(PBD::DEBUG::Destruction, string_compose ("panner @ %1 destructor, pannable is %2\n", this, _pannable));
+       DEBUG_TRACE(PBD::DEBUG::Destruction, string_compose ("panner @ %1 destructor, pannable is %2\n", this, _pannable));
 }
 
 void
@@ -66,78 +66,78 @@ Panner::set_state (const XMLNode& node, int version)
 XMLNode&
 Panner::get_state ()
 {
-        XMLNode* node = new XMLNode (X_("Panner"));
+       XMLNode* node = new XMLNode (X_("Panner"));
 
        node->add_property (X_("bypassed"), (bypassed() ? "yes" : "no"));
 
-        return *node;
+       return *node;
 }
 
 void
 Panner::distribute (BufferSet& ibufs, BufferSet& obufs, gain_t gain_coeff, pframes_t nframes)
 {
-        uint32_t which = 0;
+       uint32_t which = 0;
 
        for (BufferSet::audio_iterator src = ibufs.audio_begin(); src != ibufs.audio_end(); ++src, ++which) {
                distribute_one (*src, obufs, gain_coeff, nframes, which);
-        }
+       }
 }
 
 void
 Panner::distribute_automated (BufferSet& ibufs, BufferSet& obufs,
                               framepos_t start, framepos_t end, pframes_t nframes, pan_t** buffers)
 {
-        uint32_t which = 0;
+       uint32_t which = 0;
 
        for (BufferSet::audio_iterator src = ibufs.audio_begin(); src != ibufs.audio_end(); ++src, ++which) {
                distribute_one_automated (*src, obufs, start, end, nframes, buffers, which);
-        }
+       }
 }
 
 void
 Panner::set_automation_style (AutoStyle style)
 {
-        _pannable->set_automation_style (style);
+       _pannable->set_automation_style (style);
 }
 
 void
 Panner::set_automation_state (AutoState state)
 {
-        _pannable->set_automation_state (state);
+       _pannable->set_automation_state (state);
 }
 
 AutoState
 Panner::automation_state () const
 {
-        return _pannable->automation_state();
+       return _pannable->automation_state();
 }
 
 AutoStyle
 Panner::automation_style () const
 {
-        return _pannable->automation_style ();
+       return _pannable->automation_style ();
 }
 
 bool
 Panner::touching () const
 {
-        return _pannable->touching ();
+       return _pannable->touching ();
 }
 
 set<Evoral::Parameter>
 Panner::what_can_be_automated() const
 {
-        return _pannable->what_can_be_automated ();
+       return _pannable->what_can_be_automated ();
 }
 
 string
 Panner::describe_parameter (Evoral::Parameter p)
 {
-        return _pannable->describe_parameter (p);
+       return _pannable->describe_parameter (p);
 }
 
 string
 Panner::value_as_string (boost::shared_ptr<AutomationControl> ac) const
 {
-        return _pannable->value_as_string (ac);
+       return _pannable->value_as_string (ac);
 }
index 8644ae2ccea97dff2a6ab57fd8c9c8785f5bae2d..fa500ea85ee3794221d17cc108ab42c5a624e513 100644 (file)
@@ -21,19 +21,19 @@ PannerManager::PannerManager ()
 
 PannerManager::~PannerManager ()
 {
-        for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
-                delete *p;
-        }
+       for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
+               delete *p;
+       }
 }
 
 PannerManager&
 PannerManager::instance ()
 {
-        if (_instance == 0) {
-                _instance = new PannerManager ();
-        }
+       if (_instance == 0) {
+               _instance = new PannerManager ();
+       }
 
-        return *_instance;
+       return *_instance;
 }
 
 void
@@ -45,10 +45,10 @@ PannerManager::discover_panners ()
        Glib::PatternSpec dylib_extension_pattern("*.dylib");
 
        find_matching_files_in_search_path (panner_search_path (),
-                       so_extension_pattern, panner_modules);
+                                           so_extension_pattern, panner_modules);
 
        find_matching_files_in_search_path (panner_search_path (),
-                       dylib_extension_pattern, panner_modules);
+                                           dylib_extension_pattern, panner_modules);
 
        info << string_compose (_("looking for panners in %1"), panner_search_path().to_string()) << endmsg;
 
@@ -59,12 +59,12 @@ PannerManager::discover_panners ()
 int
 PannerManager::panner_discover (string path)
 {
-        PannerInfo* pinfo;
+       PannerInfo* pinfo;
 
        if ((pinfo = get_descriptor (path)) != 0) {
-                panner_info.push_back (pinfo);
-                info << string_compose(_("Panner discovered: \"%1\""), pinfo->descriptor.name) << endmsg;
-        }
+               panner_info.push_back (pinfo);
+               info << string_compose(_("Panner discovered: \"%1\""), pinfo->descriptor.name) << endmsg;
+       }
 
        return 0;
 }
@@ -73,7 +73,7 @@ PannerInfo*
 PannerManager::get_descriptor (string path)
 {
        void *module;
-        PannerInfo* info = 0;
+       PannerInfo* info = 0;
        PanPluginDescriptor *descriptor = 0;
        PanPluginDescriptor* (*dfunc)(void);
        const char *errstr;
@@ -94,7 +94,7 @@ PannerManager::get_descriptor (string path)
 
        descriptor = dfunc();
        if (descriptor) {
-                info = new PannerInfo (*descriptor, module);
+               info = new PannerInfo (*descriptor, module);
        } else {
                dlclose (module);
        }
@@ -105,51 +105,51 @@ PannerManager::get_descriptor (string path)
 PannerInfo*
 PannerManager::select_panner (ChanCount in, ChanCount out)
 {
-        PanPluginDescriptor* d;
-        int32_t nin = in.n_audio();
-        int32_t nout = out.n_audio();
+       PanPluginDescriptor* d;
+       int32_t nin = in.n_audio();
+       int32_t nout = out.n_audio();
 
-        /* look for exact match first */
+       /* look for exact match first */
 
-        for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
-                d = &(*p)->descriptor;
+       for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
+               d = &(*p)->descriptor;
 
-                if (d->in == nin && d->out == nout) {
-                        return *p;
-                }
-        }
+               if (d->in == nin && d->out == nout) {
+                       return *p;
+               }
+       }
 
-        /* no exact match, look for good fit on inputs and variable on outputs */
+       /* no exact match, look for good fit on inputs and variable on outputs */
 
-        for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
-                d = &(*p)->descriptor;
+       for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
+               d = &(*p)->descriptor;
 
-                if (d->in == nin && d->out == -1) {
-                        return *p;
-                }
-        }
+               if (d->in == nin && d->out == -1) {
+                       return *p;
+               }
+       }
 
-        /* no exact match, look for good fit on outputs and variable on inputs */
+       /* no exact match, look for good fit on outputs and variable on inputs */
 
-        for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
-                d = &(*p)->descriptor;
+       for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
+               d = &(*p)->descriptor;
 
-                if (d->in == -1 && d->out == nout) {
-                        return *p;
-                }
-        }
+               if (d->in == -1 && d->out == nout) {
+                       return *p;
+               }
+       }
 
-        /* no exact match, look for variable fit on inputs and outputs */
+       /* no exact match, look for variable fit on inputs and outputs */
 
-        for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
-                d = &(*p)->descriptor;
+       for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
+               d = &(*p)->descriptor;
 
-                if (d->in == -1 && d->out == -1) {
-                        return *p;
-                }
-        }
+               if (d->in == -1 && d->out == -1) {
+                       return *p;
+               }
+       }
 
-        warning << string_compose (_("no panner discovered for in/out = %1/%2"), nin, nout) << endmsg;
+       warning << string_compose (_("no panner discovered for in/out = %1/%2"), nin, nout) << endmsg;
 
-        return 0;
+       return 0;
 }
index da464c9078f070e4ce44c0069cedab9117c31fc1..762d0687d1c3a59c1246f5778441b9ad423403dc 100644 (file)
@@ -65,62 +65,62 @@ using namespace PBD;
 
 PannerShell::PannerShell (string name, Session& s, boost::shared_ptr<Pannable> p)
        : SessionObject (s, name)
-        , _pannable (p)
+       , _pannable (p)
 {
        set_name (name);
 }
 
 PannerShell::~PannerShell ()
 {
-        DEBUG_TRACE(DEBUG::Destruction, string_compose ("panner shell for %1 destructor, pannable is %2\n", _name, _pannable));
+       DEBUG_TRACE(DEBUG::Destruction, string_compose ("panner shell for %1 destructor, pannable is %2\n", _name, _pannable));
 }
 
 void
 PannerShell::configure_io (ChanCount in, ChanCount out)
 {
-        uint32_t nouts = out.n_audio();
-        uint32_t nins = in.n_audio();
+       uint32_t nouts = out.n_audio();
+       uint32_t nins = in.n_audio();
 
        /* if new and old config don't need panning, or if
           the config hasn't changed, we're done.
        */
 
        if (_panner && (_panner->in().n_audio() == nins) && (_panner->out().n_audio() == nouts)) {
-                return;
+               return;
        }
 
        if (nouts < 2 || nins == 0) {
                /* no need for panning with less than 2 outputs or no inputs */
                if (_panner) {
-                        _panner.reset ();
+                       _panner.reset ();
                        Changed (); /* EMIT SIGNAL */
                }
                return;
        }
 
-        PannerInfo* pi = PannerManager::instance().select_panner (in, out);
+       PannerInfo* pi = PannerManager::instance().select_panner (in, out);
 
-        if (pi == 0) {
-                abort ();
-        }
+       if (pi == 0) {
+               abort ();
+       }
 
-        boost::shared_ptr<Speakers> speakers = _session.get_speakers ();
+       boost::shared_ptr<Speakers> speakers = _session.get_speakers ();
 
-        if (nouts != speakers->size()) {
-                /* hmm, output count doesn't match session speaker count so
-                   create a new speaker set.
-                */
-                Speakers* s = new Speakers ();
-                s->setup_default_speakers (nouts);
-                speakers.reset (s);
-        }
+       if (nouts != speakers->size()) {
+               /* hmm, output count doesn't match session speaker count so
+                  create a new speaker set.
+               */
+               Speakers* s = new Speakers ();
+               s->setup_default_speakers (nouts);
+               speakers.reset (s);
+       }
 
-        Panner* p = pi->descriptor.factory (_pannable, speakers);
-        boost_debug_shared_ptr_mark_interesting (p, "Panner");
-        _panner.reset (p);
-        _panner->configure_io (in, out);
+       Panner* p = pi->descriptor.factory (_pannable, speakers);
+       boost_debug_shared_ptr_mark_interesting (p, "Panner");
+       _panner.reset (p);
+       _panner->configure_io (in, out);
 
-        Changed (); /* EMIT SIGNAL */
+       Changed (); /* EMIT SIGNAL */
 }
 
 XMLNode&
@@ -134,7 +134,7 @@ PannerShell::state (bool full)
 {
        XMLNode* node = new XMLNode ("PannerShell");
 
-        if (_panner) {
+       if (_panner) {
                node->add_child_nocopy (_panner->state (full));
        }
 
@@ -149,7 +149,7 @@ PannerShell::set_state (const XMLNode& node, int version)
        const XMLProperty *prop;
        LocaleGuard lg (X_("POSIX"));
 
-        _panner.reset ();
+       _panner.reset ();
 
        for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
 
@@ -157,8 +157,8 @@ PannerShell::set_state (const XMLNode& node, int version)
 
                        if ((prop = (*niter)->property (X_("type")))) {
 
-                                list<PannerInfo*>::iterator p;
-                                PannerManager& pm (PannerManager::instance());
+                               list<PannerInfo*>::iterator p;
+                               PannerManager& pm (PannerManager::instance());
 
                                for (p = pm.panner_info.begin(); p != pm.panner_info.end(); ++p) {
                                        if (prop->value() == (*p)->descriptor.name) {
@@ -168,11 +168,11 @@ PannerShell::set_state (const XMLNode& node, int version)
                                                   assumption, but it's still an assumption.
                                                */
 
-                                                _panner.reset ((*p)->descriptor.factory (_pannable, _session.get_speakers ()));
+                                               _panner.reset ((*p)->descriptor.factory (_pannable, _session.get_speakers ()));
 
                                                if (_panner->set_state (**niter, version) == 0) {
-                                                        return -1;
-                                                }
+                                                       return -1;
+                                               }
 
                                                break;
                                        }
@@ -180,7 +180,7 @@ PannerShell::set_state (const XMLNode& node, int version)
 
                                if (p == pm.panner_info.end()) {
                                        error << string_compose (_("Unknown panner plugin \"%1\" found in pan state - ignored"),
-                                                         prop->value())
+                                                                prop->value())
                                              << endmsg;
                                }
 
@@ -207,7 +207,7 @@ PannerShell::distribute_no_automation (BufferSet& inbufs, BufferSet& outbufs, pf
 
        if (outbufs.count().n_audio() == 1) {
 
-                /* just one output: no real panning going on */
+               /* just one output: no real panning going on */
 
                AudioBuffer& dst = outbufs.get_audio(0);
 
@@ -252,19 +252,19 @@ PannerShell::distribute_no_automation (BufferSet& inbufs, BufferSet& outbufs, pf
                return;
        }
 
-        /* multiple outputs ... we must have a panner */
+       /* multiple outputs ... we must have a panner */
 
-        assert (_panner);
+       assert (_panner);
 
        /* setup silent buffers so that we can mix into the outbuffers (slightly suboptimal -
-           better to copy the first set of data then mix after that, but hey, its 2011)
-         */
+          better to copy the first set of data then mix after that, but hey, its 2011)
+       */
 
        for (BufferSet::audio_iterator b = outbufs.audio_begin(); b != outbufs.audio_end(); ++b) {
                (*b).silence (nframes);
        }
 
-        _panner->distribute (inbufs, outbufs, gain_coeff, nframes);
+       _panner->distribute (inbufs, outbufs, gain_coeff, nframes);
 }
 
 void
@@ -278,7 +278,7 @@ PannerShell::run (BufferSet& inbufs, BufferSet& outbufs, framepos_t start_frame,
 
        if (outbufs.count().n_audio() == 1) {
 
-                /* one output only: no panner */
+               /* one output only: no panner */
 
                AudioBuffer& dst = outbufs.get_audio(0);
 
@@ -298,7 +298,7 @@ PannerShell::run (BufferSet& inbufs, BufferSet& outbufs, framepos_t start_frame,
 
        // More than 1 output
 
-        AutoState as = _panner->automation_state ();
+       AutoState as = _panner->automation_state ();
 
        // If we shouldn't play automation defer to distribute_no_automation
 
@@ -315,14 +315,14 @@ PannerShell::run (BufferSet& inbufs, BufferSet& outbufs, framepos_t start_frame,
 
        } else {
 
-                /* setup the terrible silence so that we can mix into the outbuffers (slightly suboptimal -
-                   better to copy the first set of data then mix after that, but hey, its 2011)
-                */
-                for (BufferSet::audio_iterator i = outbufs.audio_begin(); i != outbufs.audio_end(); ++i) {
-                        i->silence(nframes);
-                }
+               /* setup the terrible silence so that we can mix into the outbuffers (slightly suboptimal -
+                  better to copy the first set of data then mix after that, but hey, its 2011)
+               */
+               for (BufferSet::audio_iterator i = outbufs.audio_begin(); i != outbufs.audio_end(); ++i) {
+                       i->silence(nframes);
+               }
 
-                _panner->distribute_automated (inbufs, outbufs, start_frame, end_frame, nframes, _session.pan_automation_buffer());
-        }
+               _panner->distribute_automated (inbufs, outbufs, start_frame, end_frame, nframes, _session.pan_automation_buffer());
+       }
 }