*/
-#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include <algorithm>
PropertyDescriptor<bool> recenable;
PropertyDescriptor<bool> select;
PropertyDescriptor<bool> edit;
+ PropertyDescriptor<bool> route_active;
}
}
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for select = %1\n", Properties::select.property_id));
Properties::edit.property_id = g_quark_from_static_string (X_("edit"));
DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for edit = %1\n", Properties::edit.property_id));
+ Properties::route_active.property_id = g_quark_from_static_string (X_("route-active"));
+ DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for route-active = %1\n", Properties::route_active.property_id));
}
#define ROUTE_GROUP_DEFAULT_PROPERTIES _relative (Properties::relative, false) \
, _solo (Properties::solo, false) \
, _recenable (Properties::recenable, false) \
, _select (Properties::select, false) \
- , _edit (Properties::edit, false)
+ , _edit (Properties::edit, false) \
+ , _route_active (Properties::route_active, false)
RouteGroup::RouteGroup (Session& s, const string &n)
: SessionObject (s, n)
add_property (_recenable);
add_property (_select);
add_property (_edit);
+ add_property (_route_active);
}
RouteGroup::~RouteGroup ()
return set_state_2X (node, version);
}
+ set_values (node);
+
const XMLProperty *prop;
if ((prop = node.property ("routes")) != 0) {
int
RouteGroup::set_state_2X (const XMLNode& node, int /*version*/)
{
- set_properties (node);
+ set_values (node);
if (node.name() == "MixGroup") {
_gain = true;
_solo = true;
_recenable = true;
_edit = false;
+ _route_active = true;
} else if (node.name() == "EditGroup") {
_gain = false;
_mute = false;
_solo = false;
_recenable = false;
_edit = true;
+ _route_active = false;
}
return 0;
}
void
-RouteGroup::set_active (bool yn, void *src)
+RouteGroup::set_route_active (bool yn)
+{
+ if (is_route_active() == yn) {
+ return;
+ }
+ _route_active = yn;
+}
+
+void
+RouteGroup::set_active (bool yn, void* /*src*/)
{
if (is_active() == yn) {
return;
}
+
_active = yn;
+ send_change (PropertyChange (Properties::active));
+
_session.set_dirty ();
}
void
-RouteGroup::set_relative (bool yn, void *src)
-
+RouteGroup::set_relative (bool yn, void* /*src*/)
{
if (is_relative() == yn) {
return;
}
void
-RouteGroup::set_hidden (bool yn, void *src)
+RouteGroup::set_hidden (bool yn, void* /*src*/)
{
if (is_hidden() == yn) {
return;
}
void
-RouteGroup::make_subgroup ()
+RouteGroup::make_subgroup (bool aux, Placement placement)
{
RouteList rl;
uint32_t nin = 0;
try {
/* use master bus etc. to determine default nouts */
- rl = _session.new_audio_route (false, nin, 2, 0, 1);
+ rl = _session.new_audio_route (nin, 2, 0, 1);
} catch (...) {
return;
}
subgroup_bus = rl.front();
subgroup_bus->set_name (_name);
- boost::shared_ptr<Bundle> bundle = subgroup_bus->input()->bundle ();
+ if (aux) {
- for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
- (*i)->output()->disconnect (this);
- (*i)->output()->connect_ports_to_bundle (bundle, this);
+ _session.add_internal_sends (subgroup_bus, placement, routes);
+
+ } else {
+
+ boost::shared_ptr<Bundle> bundle = subgroup_bus->input()->bundle ();
+
+ for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
+ (*i)->output()->disconnect (this);
+ (*i)->output()->connect_ports_to_bundle (bundle, this);
+ }
}
}