Remove unused method..
[ardour.git] / libs / ardour / panner.cc
index 23c87f0a2e84f33e88214ee80eb1a7901a7e20c8..73326e12a4537cd82214eb7ce13a40dd57731535 100644 (file)
@@ -703,7 +703,7 @@ Multi2dPanner::set_state (const XMLNode& node)
 /*---------------------------------------------------------------------- */
 
 Panner::Panner (string name, Session& s)
-       : Processor(s, name, PostFader)
+       : Processor(s, name)
 {
        //set_name_old_auto (name);
        set_name (name);
@@ -1012,23 +1012,30 @@ Panner::set_automation_state (AutoState state)
 AutoState
 Panner::automation_state () const
 {
+       boost::shared_ptr<AutomationList> l;
        if (!empty()) {
-               return ((AutomationList*)_streampanners.front()->pan_control()->list().get())->automation_state ();
-       } else {
-               return Off;
+               boost::shared_ptr<AutomationControl> control = _streampanners.front()->pan_control();
+               if (control) {
+                       l = boost::dynamic_pointer_cast<AutomationList>(control->list());
+               }
        }
+
+       return l ? l->automation_state() : Off;
 }
 
 AutoStyle
 Panner::automation_style () const
 {
+       boost::shared_ptr<AutomationList> l;
        if (!empty()) {
-               return ((AutomationList*)_streampanners.front()->pan_control()->list().get())->automation_style ();
-       } else {
-               return Absolute;
+               boost::shared_ptr<AutomationControl> control = _streampanners.front()->pan_control();
+               if (control) {
+                       l = boost::dynamic_pointer_cast<AutomationList>(control->list());
+               }
        }
-}
 
+       return l ? l->automation_style() : Absolute;
+}
 
 struct PanPlugins {
     string name;
@@ -1412,7 +1419,7 @@ Panner::distribute_no_automation (BufferSet& inbufs, BufferSet& outbufs, nframes
 }
 
 void
-Panner::run_out_of_place (BufferSet& inbufs, BufferSet& outbufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes)
+Panner::run_out_of_place (BufferSet& inbufs, BufferSet& outbufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes)
 {      
        if (outbufs.count().n_audio() == 0) {
                // Failing to deliver audio we were asked to deliver is a bug