if (Config->get_remote_model() != UserOrdered) {
return;
}
-
- if (id < 1) {
- error << _("Remote Control ID's start at one, not zero") << endmsg;
- return;
- }
+ set_remote_control_id_internal (id, notify_class_listeners);
+}
+
+void
+Route::set_remote_control_id_internal (uint32_t id, bool notify_class_listeners)
+{
/* force IDs for master/monitor busses and prevent
any other route from accidentally getting these IDs
(i.e. legacy sessions)
id = MonitorBusRemoteControlID;
}
+ if (id < 1) {
+ return;
+ }
+
/* don't allow it to collide */
if (!is_master () && !is_monitor() &&
}
void
-Route::set_remote_control_id_from_order_key (RouteSortOrderKey key, uint32_t rid)
+Route::set_remote_control_id_from_order_key (RouteSortOrderKey /*key*/, uint32_t rid)
{
if (is_master() || is_monitor() || is_hidden()) {
/* hard-coded remote IDs, or no remote ID */
Route::set_solo (bool yn, void *src)
{
if (_solo_safe) {
+ DEBUG_TRACE (DEBUG::Solo, string_compose ("%1 ignore solo change due to solo-safe\n", name()));
return;
}
return;
}
+ DEBUG_TRACE (DEBUG::Solo, string_compose ("%1: set solo => %2, src: %3 grp ? %4 currently self-soloed ? %5\n",
+ name(), yn, src, (src == _route_group), self_soloed()));
+
if (self_soloed() != yn) {
set_self_solo (yn);
set_mute_master_solo ();
void
Route::set_self_solo (bool yn)
{
+ DEBUG_TRACE (DEBUG::Solo, string_compose ("%1: set SELF solo => %2\n", name(), yn));
_self_solo = yn;
}
Route::mod_solo_by_others_upstream (int32_t delta)
{
if (_solo_safe) {
+ DEBUG_TRACE (DEBUG::Solo, string_compose ("%1 ignore solo-by-upstream due to solo-safe\n", name()));
return;
}
+ DEBUG_TRACE (DEBUG::Solo, string_compose ("%1 mod solo-by-upstream by %2, current up = %3 down = %4\n",
+ name(), delta, _soloed_by_others_upstream, _soloed_by_others_downstream));
+
uint32_t old_sbu = _soloed_by_others_upstream;
if (delta < 0) {
Route::mod_solo_by_others_downstream (int32_t delta)
{
if (_solo_safe) {
+ DEBUG_TRACE (DEBUG::Solo, string_compose ("%1 ignore solo-by-downstream due to solo safe\n", name()));
return;
}
+ DEBUG_TRACE (DEBUG::Solo, string_compose ("%1 mod solo-by-downstream by %2, current up = %3 down = %4\n",
+ name(), delta, _soloed_by_others_upstream, _soloed_by_others_downstream));
+
if (delta < 0) {
if (_soloed_by_others_downstream >= (uint32_t) abs (delta)) {
_soloed_by_others_downstream += delta;
}
- if (activation_allowed) {
+ if (activation_allowed && !_session.get_disable_all_loaded_plugins()) {
processor->activate ();
}
if (prop->value() == "ladspa" || prop->value() == "Ladspa" ||
prop->value() == "lv2" ||
- prop->value() == "vst" ||
+ prop->value() == "windows-vst" ||
prop->value() == "lxvst" ||
prop->value() == "audiounit") {
Route::reset_instrument_info ()
{
boost::shared_ptr<Processor> instr = the_instrument();
- _instrument_info.set_internal_instrument (instr);
+ if (instr) {
+ _instrument_info.set_internal_instrument (instr);
+ }
}
/** Caller must hold process lock */
boost::shared_ptr<InternalSend> is;
if ((is = boost::dynamic_pointer_cast<InternalSend> (*i)) != 0) {
- if (is->role() == Delivery::Aux || is->role() == Delivery::Listen) {
+ if (is->role() == Delivery::Listen) {
continue;
}
}
processor_state.add_child_copy (*child);
}
-
if (child->name() == X_("Pannable")) {
if (_pannable) {
_pannable->set_state (*child, version);
set_processor_state (processor_state);
+ // this looks up the internal instrument in processors
+ reset_instrument_info();
+
if ((prop = node.property ("self-solo")) != 0) {
set_self_solo (string_is_affirmative (prop->value()));
}
if ((prop = child->property (X_("id"))) != 0) {
int32_t x;
sscanf (prop->value().c_str(), "%d", &x);
- set_remote_control_id (x);
+ set_remote_control_id_internal (x);
}
} else if (child->name() == X_("MuteMaster")) {
_flags = Flag (0);
}
+ if (is_master() || is_monitor() || is_hidden()) {
+ _mute_master->set_solo_ignore (true);
+ }
+
if ((prop = node.property (X_("phase-invert"))) != 0) {
boost::dynamic_bitset<> p (_input->n_ports().n_audio ());
if (string_is_affirmative (prop->value ())) {
} else if (keyname == "editor") {
sk = EditorSort;
} else {
- RouteSortOrderKey sk = (RouteSortOrderKey) string_2_enum (remaining.substr (0, equal), sk);
+ sk = (RouteSortOrderKey) string_2_enum (remaining.substr (0, equal), sk);
}
set_order_key (sk, n);
if ((prop = child->property (X_("id"))) != 0) {
int32_t x;
sscanf (prop->value().c_str(), "%d", &x);
- set_remote_control_id (x);
+ set_remote_control_id_internal (x);
}
}
} else if (prop->value() == "ladspa" || prop->value() == "Ladspa" ||
prop->value() == "lv2" ||
- prop->value() == "vst" ||
+ prop->value() == "windows-vst" ||
prop->value() == "lxvst" ||
prop->value() == "audiounit") {
/** Called from the (non-realtime) butler thread when the transport is stopped */
void
-Route::nonrealtime_handle_transport_stopped (bool /*abort_ignored*/, bool did_locate, bool can_flush_processors)
+Route::nonrealtime_handle_transport_stopped (bool /*abort_ignored*/, bool /*did_locate*/, bool can_flush_processors)
{
framepos_t now = _session.transport_frame();
void
Route::set_meter_point (MeterPoint p, bool force)
{
- /* CAN BE CALLED FROM PROCESS CONTEXT */
-
if (_meter_point == p && !force) {
return;
}
_input->set_active (yn);
_output->set_active (yn);
active_changed (); // EMIT SIGNAL
+ _session.set_dirty ();
}
}
Route::the_instrument () const
{
Glib::Threads::RWLock::WriterLock lm (_processor_lock);
+ return the_instrument_unlocked ();
+}
+
+boost::shared_ptr<Processor>
+Route::the_instrument_unlocked () const
+{
for (ProcessorList::const_iterator i = _processors.begin(); i != _processors.end(); ++i) {
if (boost::dynamic_pointer_cast<PluginInsert>(*i)) {
if ((*i)->input_streams().n_midi() > 0 &&
return boost::shared_ptr<Processor>();
}
+
+
void
Route::non_realtime_locate (framepos_t pos)
{