Less weak plugin preset system (maybe AU preset stuff can use the 'normal' thing...
[ardour.git] / libs / ardour / ardour / processor.h
index bf9dfe0430945a1f80c3f3e740a3181b74daf8f2..5a1011966ce3e704d24c5d8839a6d4ac7a8aa974 100644 (file)
 
 #include <ardour/types.h>
 #include <ardour/ardour.h>
-#include <ardour/plugin_state.h>
 #include <ardour/buffer_set.h>
 #include <ardour/automatable.h>
 #include <ardour/latent.h>
+#include <ardour/session_object.h>
 
 class XMLNode;
 
 namespace ARDOUR {
 
 class Session;
+class Route;
 
 /* A mixer strip element - plugin, send, meter, etc.
  */
-class Processor : public Automatable, public Latent
+class Processor : public SessionObject, public AutomatableControls, public Latent
 {
   public:
        static const string state_node_name;
@@ -61,7 +62,6 @@ class Processor : public Automatable, public Latent
        void set_placement (Placement);
        
        bool active () const { return _active; }
-       void set_active (bool yn);
        
        bool get_next_ab_is_active () const { return _next_ab_is_active; }
        void set_next_ab_is_active (bool yn) { _next_ab_is_active = yn; }
@@ -78,10 +78,10 @@ class Processor : public Automatable, public Latent
        
        virtual void silence (nframes_t nframes, nframes_t offset) {}
        
-       virtual void activate () { _active = true; ActiveChanged.emit(); }
-       virtual void deactivate () { _active = false; ActiveChanged.emit(); }
+       void activate () { _active = true; ActiveChanged(); }
+       void deactivate () { _active = false; ActiveChanged(); }
        
-       virtual bool configure_io (ChanCount in, ChanCount out) { _configured_input = in; return (_configured = true); }
+       virtual bool configure_io (ChanCount in, ChanCount out);
 
        /* Derived classes should override these, or processor appears as an in-place pass-through */
 
@@ -92,8 +92,7 @@ class Processor : public Automatable, public Latent
         * and write to their output parameter */
        virtual bool is_out_of_place () const { return false; }
 
-       virtual bool      can_support_input_configuration (ChanCount in) const { return true; }
-       virtual ChanCount output_for_input_configuration (ChanCount in) const { return in; }
+       virtual bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const = 0;
        virtual ChanCount output_streams() const { return _configured_input; }
        virtual ChanCount input_streams () const { return _configured_input; }
 
@@ -110,6 +109,7 @@ class Processor : public Automatable, public Latent
        sigc::signal<void> PlacementChanged;
 
 protected:
+       int       _pending_active;
        bool      _active;
        bool      _next_ab_is_active;
        bool      _configured;