+ Properties::active.property_id = g_quark_from_static_string (X_("active"));
+ DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for active = %1\n", Properties::active.property_id));
+
+ Properties::group_relative.property_id = g_quark_from_static_string (X_("relative"));
+ DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for relative = %1\n", Properties::group_relative.property_id));
+ Properties::group_gain.property_id = g_quark_from_static_string (X_("gain"));
+ DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for gain = %1\n", Properties::group_gain.property_id));
+ Properties::group_mute.property_id = g_quark_from_static_string (X_("mute"));
+ DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for mute = %1\n", Properties::group_mute.property_id));
+ Properties::group_solo.property_id = g_quark_from_static_string (X_("solo"));
+ DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for solo = %1\n", Properties::group_solo.property_id));
+ Properties::group_recenable.property_id = g_quark_from_static_string (X_("recenable"));
+ DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for recenable = %1\n", Properties::group_recenable.property_id));
+ Properties::group_select.property_id = g_quark_from_static_string (X_("select"));
+ DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for select = %1\n", Properties::group_select.property_id));
+ Properties::group_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::group_route_active.property_id));
+ Properties::group_color.property_id = g_quark_from_static_string (X_("color"));
+ DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for color = %1\n", Properties::group_color.property_id));
+ Properties::group_monitoring.property_id = g_quark_from_static_string (X_("monitoring"));
+ DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for monitoring = %1\n", Properties::group_monitoring.property_id));
+ Properties::group_master_number.property_id = g_quark_from_static_string (X_("group-master-number"));
+ DEBUG_TRACE (DEBUG::Properties, string_compose ("quark for group-master-number = %1\n", Properties::group_master_number.property_id));
+}
+
+#define ROUTE_GROUP_DEFAULT_PROPERTIES _relative (Properties::group_relative, true) \
+ , _active (Properties::active, true) \
+ , _hidden (Properties::hidden, false) \
+ , _gain (Properties::group_gain, true) \
+ , _mute (Properties::group_mute, true) \
+ , _solo (Properties::group_solo, true) \
+ , _recenable (Properties::group_recenable, true) \
+ , _select (Properties::group_select, true) \
+ , _route_active (Properties::group_route_active, true) \
+ , _color (Properties::group_color, true) \
+ , _monitoring (Properties::group_monitoring, true) \
+ , _group_master_number (Properties::group_master_number, -1)
+
+RouteGroup::RouteGroup (Session& s, const string &n)
+ : SessionObject (s, n)
+ , routes (new RouteList)
+ , ROUTE_GROUP_DEFAULT_PROPERTIES
+ , _solo_group (new ControlGroup (SoloAutomation))
+ , _mute_group (new ControlGroup (MuteAutomation))
+ , _rec_enable_group (new ControlGroup (RecEnableAutomation))
+ , _gain_group (new GainControlGroup ())
+ , _monitoring_group (new ControlGroup (MonitoringAutomation))
+{
+ _xml_node_name = X_("RouteGroup");
+
+ add_property (_relative);
+ add_property (_active);
+ add_property (_hidden);
+ add_property (_gain);
+ add_property (_mute);
+ add_property (_solo);
+ add_property (_recenable);
+ add_property (_select);
+ add_property (_route_active);
+ add_property (_color);
+ add_property (_monitoring);
+ add_property (_group_master_number);
+}
+
+RouteGroup::~RouteGroup ()
+{
+ _solo_group->clear ();
+ _mute_group->clear ();
+ _gain_group->clear ();
+ _rec_enable_group->clear ();
+ _monitoring_group->clear ();
+
+ boost::shared_ptr<VCA> vca (group_master.lock());
+
+ for (RouteList::iterator i = routes->begin(); i != routes->end();) {
+ RouteList::iterator tmp = i;
+ ++tmp;
+
+ (*i)->set_route_group (0);
+
+ if (vca) {
+ (*i)->unassign (vca);
+ }
+
+ i = tmp;
+ }