rip more useless junk out of PannerUI, and check that automation playback works for...
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 7 Jan 2011 20:47:38 +0000 (20:47 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 7 Jan 2011 20:47:38 +0000 (20:47 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8477 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/panner_ui.cc
gtk2_ardour/panner_ui.h

index 730b382d6b3ac08e8fa5153f8ac906ffcbd59dae..390e47d096cfcd08126b7e123ff746222d8bb0b0 100644 (file)
@@ -608,58 +608,15 @@ PannerUI::pan_reset_all ()
 void
 PannerUI::effective_pan_display ()
 {
-       if (_panner->empty()) {
-               return;
-       }
-
-       switch (_panner->nouts()) {
-       case 0:
-       case 1:
-               /* relax: no panning */
-               break;
-
-       case 2:
-               update_pan_bars (true);
-               break;
-
-       default:
-               //panner->move_puck (pan_value (v, right), 0.5);
-               break;
-       }
-}
-
-void
-PannerUI::update_pan_bars (bool only_if_aplay)
-{
-       uint32_t n;
-
-       in_pan_update = true;
-
-#if 0
-       /* this runs during automation playback, and moves the bar controllers
-          and/or pucks around.
-       */
-
-       for (i = pan_bars.begin(), n = 0; i != pan_bars.end(); ++i, ++n) {
-
-               if (only_if_aplay) {
-                       boost::shared_ptr<AutomationList> alist (_panner->streampanner(n).pan_control()->alist());
-                       if (!alist->automation_playback()) {
-                               continue;
-                       }
-               }
-
-                AngularVector model = _panner->streampanner(n).get_effective_position();
-                double fract = (*i)->get_value();
-                AngularVector view (BaseStereoPanner::lr_fract_to_azimuth (fract), 0.0);
-
-               if (!Panner::equivalent (model, view)) {
-                       (*i)->set_value (BaseStereoPanner::azimuth_to_lr_fract (model.azi));
-               }
+        if (_stereo_panner) {
+                _stereo_panner->queue_draw ();
+        } else if (twod_panner) {
+                twod_panner->queue_draw ();
+        } else {
+                for (vector<MonoPanner*>::iterator i = pan_bars.begin(); i != pan_bars.end(); ++i) {
+                        (*i)->queue_draw ();
+                }
        }
-#endif
-
-       in_pan_update = false;
 }
 
 void
index 94142061b79057f43ba92aa65fab49dbb8b6102e..50fc6b228d19c4dac3a790f6935237b893bd0114 100644 (file)
@@ -140,7 +140,6 @@ class PannerUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr
        std::vector<MonoPanner*> pan_bars;
 
        void pan_value_changed (uint32_t which);
-        void update_pan_bars (bool);
        void update_pan_linkage ();
        void update_pan_state ();
        void build_astate_menu ();