X-Git-Url: https://main.carlh.net/gitweb/?p=ardour.git;a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Froute_group.h;h=5263aceb0f3c38f89caf48ab6eb247861fbc2901;hp=763430e1f1c1d6a607ed4ebf5b747fb8c245759e;hb=2cc33684c71131fd483346fe05e3b1a0e1706de9;hpb=2a7ed69c28c5c4606ff13b3605b9bc9c3eba607d diff --git a/libs/ardour/ardour/route_group.h b/libs/ardour/ardour/route_group.h index 763430e1f1..5263aceb0f 100644 --- a/libs/ardour/ardour/route_group.h +++ b/libs/ardour/ardour/route_group.h @@ -25,28 +25,30 @@ #include #include +#include "pbd/controllable.h" #include "pbd/signals.h" #include "pbd/stateful.h" -#include "pbd/signals.h" -#include "ardour/libardour_visibility.h" +#include "ardour/control_group.h" #include "ardour/types.h" #include "ardour/session_object.h" +#include "ardour/libardour_visibility.h" + namespace ARDOUR { namespace Properties { - LIBARDOUR_API extern PBD::PropertyDescriptor relative; + LIBARDOUR_API extern PBD::PropertyDescriptor group_relative; + LIBARDOUR_API extern PBD::PropertyDescriptor group_gain; + LIBARDOUR_API extern PBD::PropertyDescriptor group_mute; + LIBARDOUR_API extern PBD::PropertyDescriptor group_solo; + LIBARDOUR_API extern PBD::PropertyDescriptor group_recenable; + LIBARDOUR_API extern PBD::PropertyDescriptor group_select; + LIBARDOUR_API extern PBD::PropertyDescriptor group_route_active; + LIBARDOUR_API extern PBD::PropertyDescriptor group_color; + LIBARDOUR_API extern PBD::PropertyDescriptor group_monitoring; LIBARDOUR_API extern PBD::PropertyDescriptor active; - LIBARDOUR_API extern PBD::PropertyDescriptor gain; - LIBARDOUR_API extern PBD::PropertyDescriptor mute; - LIBARDOUR_API extern PBD::PropertyDescriptor solo; - LIBARDOUR_API extern PBD::PropertyDescriptor recenable; - LIBARDOUR_API extern PBD::PropertyDescriptor select; - LIBARDOUR_API extern PBD::PropertyDescriptor route_active; - LIBARDOUR_API extern PBD::PropertyDescriptor color; - LIBARDOUR_API extern PBD::PropertyDescriptor monitoring; - /* we use this, but its declared in region.cc */ + /* we use these declared in region.cc */ LIBARDOUR_API extern PBD::PropertyDescriptor hidden; }; @@ -55,6 +57,13 @@ class Track; class AudioTrack; class Session; +/** A group identifier for routes. + * + * RouteGroups permit to define properties which are shared + * among all Routes that use the given identifier. + * + * A route can at most be in one group. + */ class LIBARDOUR_API RouteGroup : public SessionObject { public: @@ -108,7 +117,7 @@ class LIBARDOUR_API RouteGroup : public SessionObject /* to use these, #include "ardour/route_group_specialized.h" */ - template void apply (void (Track::*func)(T, void *), T val, void *src); + template void apply (void (Track::*func)(T, PBD::Controllable::GroupControlDisposition), T val, PBD::Controllable::GroupControlDisposition); /* fills at_set with all members of the group that are AudioTracks */ @@ -134,9 +143,14 @@ class LIBARDOUR_API RouteGroup : public SessionObject int set_state (const XMLNode&, int version); -private: + void assign_master (boost::shared_ptr); + void unassign_master (boost::shared_ptr); + bool slaved () const; + + private: boost::shared_ptr routes; boost::shared_ptr subgroup_bus; + boost::weak_ptr group_master; PBD::Property _relative; PBD::Property _active; @@ -150,8 +164,17 @@ private: PBD::Property _color; PBD::Property _monitoring; + boost::shared_ptr _solo_group; + boost::shared_ptr _mute_group; + boost::shared_ptr _rec_enable_group; + boost::shared_ptr _gain_group; + boost::shared_ptr _monitoring_group; + void remove_when_going_away (boost::weak_ptr); int set_state_2X (const XMLNode&, int); + + void post_set (PBD::PropertyChange const &); + void push_to_groups (); }; } /* namespace */