diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-03-02 12:09:24 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-31 15:30:39 -0400 |
commit | 35172bb369eea6245e08b258f4a350411c20f98d (patch) | |
tree | 6cece2c4bc2f6cb986ec341cc3c11ff6a894892e /libs/ardour/ardour/gain_control.h | |
parent | cab88c6aad6782e621ae9c51aac5af24a2f3d5b8 (diff) |
change API for GainControl, VCA and VCAManager
This allows sane state save/restore
Diffstat (limited to 'libs/ardour/ardour/gain_control.h')
-rw-r--r-- | libs/ardour/ardour/gain_control.h | 18 |
1 files changed, 13 insertions, 5 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 */ |