diff options
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/gain_control.h | 18 | ||||
-rw-r--r-- | libs/ardour/ardour/vca.h | 4 |
2 files changed, 14 insertions, 8 deletions
diff --git a/libs/ardour/ardour/gain_control.h b/libs/ardour/ardour/gain_control.h index 7845679220..93d9c4fec0 100644 --- a/libs/ardour/ardour/gain_control.h +++ b/libs/ardour/ardour/gain_control.h @@ -20,7 +20,7 @@ #define __ardour_gain_control_h__ #include <string> -#include <list> +#include <set> #include <boost/shared_ptr.hpp> #include <glibmm/threads.h> @@ -54,20 +54,28 @@ class LIBARDOUR_API GainControl : public AutomationControl { double range_db; gain_t get_master_gain () const; - void add_master (boost::shared_ptr<GainControl>); - void remove_master (boost::shared_ptr<GainControl>); + void add_master (boost::shared_ptr<VCA>); + void remove_master (boost::shared_ptr<VCA>); void clear_masters (); - bool slaved_to (boost::shared_ptr<GainControl>) const; + bool slaved_to (boost::shared_ptr<VCA>) const; + std::vector<uint32_t> masters () const; + + int set_state (XMLNode const&, int); + XMLNode& get_state(); private: void _set_value (double val, PBD::Controllable::GroupControlDisposition group_override); mutable Glib::Threads::Mutex master_lock; - typedef std::list<boost::shared_ptr<GainControl> > Masters; + typedef std::set<boost::shared_ptr<GainControl> > Masters; Masters _masters; + PBD::ScopedConnectionList masters_connections; + std::set<uint32_t> _masters_numbers; + std::string _masters_state_string (); gain_t get_master_gain_locked () const; + void master_going_away (boost::weak_ptr<VCA>); }; } /* namespace */ diff --git a/libs/ardour/ardour/vca.h b/libs/ardour/ardour/vca.h index a4da21e31f..4359899f6f 100644 --- a/libs/ardour/ardour/vca.h +++ b/libs/ardour/ardour/vca.h @@ -37,6 +37,7 @@ class LIBARDOUR_API VCA : public SessionHandleRef, public PBD::StatefulDestructi public: VCA (Session& session, const std::string& name, uint32_t num); VCA (Session& session, XMLNode const&, int version); + ~VCA(); std::string name() const { return _name; } uint32_t number () const { return _number; } @@ -48,9 +49,6 @@ class LIBARDOUR_API VCA : public SessionHandleRef, public PBD::StatefulDestructi boost::shared_ptr<GainControl> control() const { return _control; } - void add (boost::shared_ptr<Route>); - void remove (boost::shared_ptr<Route>); - XMLNode& get_state(); int set_state (XMLNode const&, int version); |