, _solo_control (new SoloControllable (X_("solo"), *this))
, _mute_control (new MuteControllable (X_("mute"), *this))
, _mute_master (new MuteMaster (sess, name))
- , _mute_points (MuteMaster::AllPoints)
, _have_internal_generator (false)
- , _physically_connected (false)
- , _graph_level (-1)
, _solo_safe (false)
, _default_type (default_type)
, _remote_control_id (0)
/* add amp processor */
- _amp.reset (new Amp (_session, _mute_master));
+ _amp.reset (new Amp (_session));
add_processor (_amp, PostFader);
/* add standard processors: meter, main outs, monitor out */
if (yn != _monitor_send->active()) {
if (yn) {
_monitor_send->activate ();
- } else {
+ _mute_master->set_soloed (true);
+ } else {
_monitor_send->deactivate ();
+ _mute_master->set_soloed (false);
}
listen_changed (src); /* EMIT SIGNAL */
uint32_t old_sbu = _soloed_by_others_upstream;
- cerr << name() << " SbU was " << old_sbu << " delta " << delta << " = ";
-
if (delta < 0) {
if (_soloed_by_others_upstream >= (uint32_t) abs (delta)) {
_soloed_by_others_upstream += delta;
_soloed_by_others_upstream += delta;
}
- cerr << _soloed_by_others_upstream << endl;
+ DEBUG_TRACE (DEBUG::Solo, string_compose ("%1 SbU delta %2 = %3 old = %4 sbd %5 ss %6 exclusive %7\n",
+ name(), delta, _soloed_by_others_upstream, old_sbu,
+ _soloed_by_others_downstream, _self_solo, Config->get_exclusive_solo()));
/* push the inverse solo change to everything that feeds us.
not in reverse.
*/
- cerr << name() << " SbU ... latched solo? " << Config->get_solo_latched() << " delta = " << delta << endl;
-
- bool push_inverse = false;
-
- if (old_sbu > 0 && _soloed_by_others_upstream == 0 && _self_solo) {
- /* we went back to non-soloed-by-others-upstream but we're still soloed push */
- push_inverse = true;
- }
+ if ((_self_solo || _soloed_by_others_downstream) &&
+ ((old_sbu == 0 && _soloed_by_others_upstream > 0) ||
+ (old_sbu > 0 && _soloed_by_others_upstream == 0))) {
- if (old_sbu == 0 && _soloed_by_others_upstream > 0) {
- /* upstream made us solo when we weren't before */
- push_inverse = true;
- }
-
- if (push_inverse) {
- cerr << "\t ... INVERT push\n";
- for (FedBy::iterator i = _fed_by.begin(); i != _fed_by.end(); ++i) {
- boost::shared_ptr<Route> sr = i->r.lock();
- if (sr) {
- sr->mod_solo_by_others_downstream (-delta);
+ if (delta > 0 || !Config->get_exclusive_solo()) {
+ DEBUG_TRACE (DEBUG::Solo, "\t ... INVERT push\n");
+ for (FedBy::iterator i = _fed_by.begin(); i != _fed_by.end(); ++i) {
+ boost::shared_ptr<Route> sr = i->r.lock();
+ if (sr) {
+ sr->mod_solo_by_others_downstream (-delta);
+ }
}
- }
+ }
}
set_mute_master_solo ();
return;
}
- cerr << name() << " SbD delta " << delta << " = ";
-
if (delta < 0) {
if (_soloed_by_others_downstream >= (uint32_t) abs (delta)) {
_soloed_by_others_downstream += delta;
_soloed_by_others_downstream += delta;
}
- cerr << _soloed_by_others_downstream << endl;
+ DEBUG_TRACE (DEBUG::Solo, string_compose ("%1 SbD delta %2 = %3\n", name(), delta, _soloed_by_others_downstream));
set_mute_master_solo ();
solo_changed (false, this);
/* XXX should we back-propagate as well? (April 2010: myself and chris goddard think not) */
+ bool changed = false;
+
if (yn) {
if (_solo_isolated == 0) {
_mute_master->set_solo_ignore (true);
+ changed = true;
}
_solo_isolated++;
- solo_isolated_changed (src);
} else {
if (_solo_isolated > 0) {
_solo_isolated--;
if (_solo_isolated == 0) {
_mute_master->set_solo_ignore (false);
+ changed = true;
}
- solo_isolated_changed (src);
}
}
+ if (changed) {
+ solo_isolated_changed (src);
+ }
}
bool
void
Route::set_mute_points (MuteMaster::MutePoint mp)
{
- _mute_points = mp;
- _mute_master->set_mute_points (MuteMaster::AllPoints);
+ _mute_master->set_mute_points (mp);
mute_points_changed (); /* EMIT SIGNAL */
if (_mute_master->muted()) {
}
processors_changed (RouteProcessorChange ()); /* EMIT SIGNAL */
+ set_processor_positions ();
return 0;
}
}
processors_changed (RouteProcessorChange ()); /* EMIT SIGNAL */
+ set_processor_positions ();
return 0;
}
processor_max_streams.reset();
_have_internal_generator = false;
processors_changed (RouteProcessorChange ()); /* EMIT SIGNAL */
+ set_processor_positions ();
if (!already_deleting) {
_session.clear_deletion_in_progress();
processor->drop_references ();
processors_changed (RouteProcessorChange ()); /* EMIT SIGNAL */
+ set_processor_positions ();
return 0;
}
}
processors_changed (RouteProcessorChange ()); /* EMIT SIGNAL */
+ set_processor_positions ();
return 0;
}
if (true) {
processors_changed (RouteProcessorChange ()); /* EMIT SIGNAL */
+ set_processor_positions ();
}
return 0;
}
processors_changed (RouteProcessorChange ());
+ set_processor_positions ();
}
void
return false;
}
-void
-Route::check_physical_connections ()
-{
- _physically_connected = _output->physically_connected ();
-}
-
void
Route::handle_transport_stopped (bool /*abort_ignored*/, bool did_locate, bool can_flush_processors)
{
return false;
}
+MuteMaster::MutePoint
+Route::mute_points () const
+{
+ return _mute_master->mute_points ();
+}
+
void
-Route::set_graph_level (int32_t l)
+Route::set_processor_positions ()
{
- _graph_level = l;
+ Glib::RWLock::ReaderLock lm (_processor_lock);
+
+ bool had_amp = false;
+ for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
+ (*i)->set_pre_fader (!had_amp);
+ if (boost::dynamic_pointer_cast<Amp> (*i)) {
+ had_amp = true;
+ }
+ }
}