82 #define ROUTE_GROUP_DEFAULT_PROPERTIES _relative (Properties::relative, true) \
83 , _active (Properties::active, false) \
84 , _hidden (Properties::hidden, false) \
85 , _gain (Properties::gain, false) \
86 , _mute (Properties::mute, false) \
87 , _solo (Properties::solo, false) \
88 , _recenable (Properties::recenable, false) \
89 , _select (Properties::select, false) \
90 , _route_active (Properties::route_active, false) \
91 , _color (Properties::color, false) \
92 , _monitoring (Properties::monitoring, false)
99 _xml_node_name =
X_(
"RouteGroup");
114 RouteGroup::~RouteGroup ()
116 for (RouteList::iterator i =
routes->begin(); i !=
routes->end();) {
117 RouteList::iterator tmp = i;
120 (*i)->set_route_group (0);
142 r->set_route_group (
this);
163 RouteList::iterator i;
166 r->set_route_group (0);
180 for (RouteList::iterator i =
routes->begin(); i !=
routes->end(); ++i) {
181 gain_t const g = (*i)->amp()->gain();
183 if ((g + g * factor) >= 0.0
f) {
187 if (g <= 0.0000003
f) {
191 factor = 0.0000003f / g - 1.0f;
200 for (RouteList::iterator i =
routes->begin(); i !=
routes->end(); i++) {
201 gain_t const g = (*i)->amp()->gain();
204 if ((g + g * factor) <= 1.99526231
f) {
209 if (g >= 1.99526231
f) {
214 factor = 1.99526231f / g - 1.0f;
226 id().
print (buf,
sizeof (buf));
234 for (RouteList::iterator i =
routes->begin(); i !=
routes->end(); ++i) {
235 str << (*i)->id () <<
' ';
247 if (version < 3000) {
256 if ((prop = node.
property (
"routes")) != 0) {
257 stringstream str (prop->
value());
259 split (str.str(), ids,
' ');
261 for (vector<string>::iterator i = ids.begin(); i != ids.end(); ++i) {
279 if (node.
name() ==
"MixGroup") {
286 }
else if (node.
name() ==
"EditGroup") {
373 for (RouteList::iterator i =
routes->begin(); i !=
routes->end(); ++i) {
374 (*i)->gui_changed (
X_(
"color"),
this);
423 if (
Config->get_hiding_groups_deactivates_groups()) {
428 if (
Config->get_hiding_groups_deactivates_groups()) {
441 for (RouteList::iterator i =
routes->begin(); i !=
routes->end(); ++i) {
457 for (RouteList::iterator i =
routes->begin(); i !=
routes->end(); ++i) {
458 if ((*i)->output()->n_ports().n_midi() != 0) {
464 for (RouteList::iterator i =
routes->begin(); i !=
routes->end(); ++i) {
465 nin = max (nin, (*i)->output()->n_ports().n_audio());
486 for (RouteList::iterator i =
routes->begin(); i !=
routes->end(); ++i) {
487 (*i)->output()->disconnect (
this);
488 (*i)->output()->connect_ports_to_bundle (bundle,
false,
this);
500 for (RouteList::iterator i =
routes->begin(); i !=
routes->end(); ++i) {
501 (*i)->output()->disconnect (
this);
518 OwnedPropertyList::iterator i =
_properties->find (prop);
gain_t get_max_factor(gain_t factor)
ARDOUR::Session & _session
PBD::Property< bool > _solo
virtual void send_change(const PropertyChange &)
PBD::Signal0< void > DropReferences
void add_internal_sends(boost::shared_ptr< Route > dest, Placement p, boost::shared_ptr< RouteList > senders)
const std::string & value() const
boost::shared_ptr< Route > route_by_id(PBD::ID)
void set_recenable(bool yn)
int set_state(const XMLNode &, int version)
void audio_track_group(std::set< boost::shared_ptr< AudioTrack > > &at_set)
LIBARDOUR_API PBD::PropertyDescriptor< bool > hidden
LIBPBD_API void split(std::string, std::vector< std::string > &, char)
void set_monitoring(bool yn)
shared_ptr< T > dynamic_pointer_cast(shared_ptr< U > const &r)
const std::string & name() const
bool has_subgroup() const
LIBARDOUR_API PBD::PropertyDescriptor< bool > gain
void set_route_active(bool yn)
bool set_name(const std::string &str)
PBD::Signal2< void, RouteGroup *, boost::weak_ptr< ARDOUR::Route > > RouteRemoved
void add_properties(XMLNode &)
std::ostream & endmsg(std::ostream &ostr)
PropertyChange set_values(XMLNode const &)
void remove_route(boost::shared_ptr< Route >)
OwnedPropertyList * _properties
PBD::Property< bool > _recenable
PBD::Property< bool > _active
void set_relative(bool yn, void *src)
PBD::Property< bool > _route_active
PBD::Property< bool > _hidden
void make_subgroup(bool, Placement)
boost::shared_ptr< RouteList > routes
XMLProperty * property(const char *)
LIBARDOUR_API RCConfiguration * Config
LIBARDOUR_API PBD::PropertyDescriptor< bool > recenable
#define ROUTE_GROUP_DEFAULT_PROPERTIES
LIBARDOUR_API PBD::PropertyDescriptor< bool > route_active
int remove(boost::shared_ptr< Route >)
const PBD::ID & id() const
void print(char *buf, uint32_t bufsize) const
bool set_id(const XMLNode &)
bool enabled_property(PBD::PropertyID)
bool is_route_active() const
PBD::Property< bool > _relative
bool is_recenable() const
void remove_when_going_away(boost::weak_ptr< Route >)
PBD::Property< bool > _color
boost::shared_ptr< Route > subgroup_bus
static void make_property_quarks()
LIBARDOUR_API PBD::PropertyDescriptor< bool > mute
void set_hidden(bool yn, void *src)
#define DEBUG_TRACE(bits, str)
RouteGroup::RouteGroup(Session &s, const string &n) add_property(_relative)
RouteList new_audio_route(int input_channels, int output_channels, RouteGroup *route_group, uint32_t how_many, std::string name_template="")
PBD::Property< std::string > _name
PBD::Property< bool > _select
LIBPBD_API Transmitter info
LIBARDOUR_API PBD::PropertyDescriptor< bool > active
LIBPBD_API uint64_t Properties
XMLProperty * add_property(const char *name, const std::string &value)
RouteGroup(Session &s, const std::string &n)
int set_state_2X(const XMLNode &, int)
bool is_monitoring() const
PBD::Property< bool > _gain
LIBARDOUR_API PBD::PropertyDescriptor< bool > solo
LIBARDOUR_API PBD::PropertyDescriptor< bool > relative
RouteGroup * route_group() const
PBD::Signal2< void, RouteGroup *, boost::weak_ptr< ARDOUR::Route > > RouteAdded
LIBARDOUR_API PBD::PropertyDescriptor< bool > select
int add(boost::shared_ptr< Route >)
boost::shared_ptr< IO > input() const
PBD::Property< bool > _mute
gain_t get_min_factor(gain_t factor)
std::list< boost::shared_ptr< Route > > RouteList
void set_active(bool yn, void *src)
std::string string_compose(const std::string &fmt, const T1 &o1)
PBD::Property< bool > _monitoring
LIBARDOUR_API PBD::PropertyDescriptor< bool > color
LIBARDOUR_API PBD::PropertyDescriptor< bool > monitoring