triggerbox: fix responses to "Play Cues" button being clicked
Session handles the case when the button is used to enable cue triggering, by forcing a locate to the current transport position. TriggerBox now connects to the correct configuration object to notice when cue triggering is disabled, and sets _cancel_locate_armed appropriately.
This commit is contained in:
parent
fd879ca45d
commit
c1f92861c6
@ -4415,6 +4415,12 @@ Session::config_changed (std::string p, bool ours)
|
|||||||
_master_out->set_volume_applies_to_output (true);
|
_master_out->set_volume_applies_to_output (true);
|
||||||
master_volume ()->set_value (GAIN_COEFF_UNITY, Controllable::NoGroup);
|
master_volume ()->set_value (GAIN_COEFF_UNITY, Controllable::NoGroup);
|
||||||
}
|
}
|
||||||
|
} else if (p == "cue-behavior") {
|
||||||
|
bool follow = (config.get_cue_behavior() & FollowCues);
|
||||||
|
std::cerr << "cue behavior changed, follow = " << follow << std::endl;
|
||||||
|
if (follow && !transport_state_rolling() && !loading()) {
|
||||||
|
request_locate (transport_sample(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set_dirty ();
|
set_dirty ();
|
||||||
|
@ -2900,6 +2900,7 @@ TriggerBox::TriggerBox (Session& s, DataType dt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Config->ParameterChanged.connect_same_thread (*this, boost::bind (&TriggerBox::parameter_changed, this, _1));
|
Config->ParameterChanged.connect_same_thread (*this, boost::bind (&TriggerBox::parameter_changed, this, _1));
|
||||||
|
_session.config.ParameterChanged.connect_same_thread (*this, boost::bind (&TriggerBox::parameter_changed, this, _1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -2919,21 +2920,8 @@ TriggerBox::parameter_changed (std::string const & param)
|
|||||||
reconnect_to_default ();
|
reconnect_to_default ();
|
||||||
|
|
||||||
} else if (param == "cue-behavior") {
|
} else if (param == "cue-behavior") {
|
||||||
bool follow = (_session.config.get_cue_behavior() & FollowCues);
|
const bool follow = (_session.config.get_cue_behavior() & FollowCues);
|
||||||
if (follow) {
|
if (!follow) {
|
||||||
|
|
||||||
/* XXX this is all wrong. We have to do the
|
|
||||||
* fast_forward() call from something like the butler
|
|
||||||
* thread, as we do when a locate happens (and we are
|
|
||||||
* following cues).
|
|
||||||
*
|
|
||||||
* FIX ME.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (!_session.transport_state_rolling()) {
|
|
||||||
fast_forward (_session.cue_events(), _session.transport_sample());
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
cancel_locate_armed ();
|
cancel_locate_armed ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user