Add a noise generator (Lua DSP)
[ardour.git] / libs / ardour / ardour / slavable_automation_control.h
index 88114d24c60356f364438ad840e6ba7e10c9c4b7..17aafd699a3054f579938368e4e415a76d6453bf 100644 (file)
@@ -40,12 +40,14 @@ public:
 
        double get_value () const;
 
-       void add_master (boost::shared_ptr<AutomationControl>, bool loading);
+       void add_master (boost::shared_ptr<AutomationControl>);
        void remove_master (boost::shared_ptr<AutomationControl>);
        void clear_masters ();
        bool slaved_to (boost::shared_ptr<AutomationControl>) const;
        bool slaved () const;
 
+       virtual void automation_run (samplepos_t start, pframes_t nframes);
+
        double get_masters_value () const {
                Glib::Threads::RWLock::ReaderLock lm (master_lock);
                return get_masters_value_locked ();
@@ -57,7 +59,7 @@ public:
                return reduce_by_masters_locked (val, ignore_automation_state);
        }
 
-       bool get_masters_curve (framepos_t s, framepos_t e, float* v, framecnt_t l) const {
+       bool get_masters_curve (samplepos_t s, samplepos_t e, float* v, samplecnt_t l) const {
                Glib::Threads::RWLock::ReaderLock lm (master_lock);
                return get_masters_curve_locked (s, e, v, l);
        }
@@ -67,8 +69,6 @@ public:
        */
        int32_t   get_boolean_masters () const;
 
-       std::vector<PBD::ID> masters () const;
-
        PBD::Signal0<void> MasterStatusChange;
 
        void use_saved_master_ratios ();
@@ -100,7 +100,8 @@ protected:
                double val_ctrl () const { return _val_ctrl; }
                double val_master () const { return _val_master; }
 
-               double master_ratio () const { return _val_master == 0 ? master()->get_value() : master()->get_value() / _val_master; }
+               double val_master_inv () const { return _val_master == 0 ? 0 : 1.0 / _val_master; }
+               double master_ratio () const { return _val_master == 0 ? 0 : master()->get_value() / _val_master; }
 
                int set_state (XMLNode const&, int);
 
@@ -134,15 +135,15 @@ protected:
        void   actually_set_value (double value, PBD::Controllable::GroupControlDisposition);
        void   update_boolean_masters_records (boost::shared_ptr<AutomationControl>);
 
-       virtual bool get_masters_curve_locked (framepos_t, framepos_t, float*, framecnt_t) const;
-       bool masters_curve_multiply (framepos_t, framepos_t, float*, framecnt_t) const;
+       virtual bool get_masters_curve_locked (samplepos_t, samplepos_t, float*, samplecnt_t) const;
+       bool masters_curve_multiply (samplepos_t, samplepos_t, float*, samplecnt_t) const;
 
        virtual double reduce_by_masters_locked (double val, bool) const;
        virtual double scale_automation_callback (double val, double ratio) const;
 
        virtual bool handle_master_change (boost::shared_ptr<AutomationControl>);
-       virtual bool boolean_automation_run_locked (framepos_t start, pframes_t len);
-       bool boolean_automation_run (framepos_t start, pframes_t len);
+       virtual bool boolean_automation_run_locked (samplepos_t start, pframes_t len);
+       bool boolean_automation_run (samplepos_t start, pframes_t len);
 
        virtual void   master_changed (bool from_self, GroupControlDisposition gcd, boost::weak_ptr<AutomationControl>);
        virtual double get_masters_value_locked () const;