13
0

Update vari-speed availability, depending on port-resampler

This commit is contained in:
Robin Gareus 2023-02-04 03:21:27 +01:00
parent 19b8069720
commit 51e93399ba
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 4 additions and 1 deletions

View File

@ -186,6 +186,8 @@ ShuttleControl::ShuttleControl ()
}
Config->ParameterChanged.connect (parameter_connection, MISSING_INVALIDATOR, boost::bind (&ShuttleControl::parameter_changed, this, _1), gui_context ());
Port::ResamplerQualityChanged.connect (port_connection, MISSING_INVALIDATOR, boost::bind (&ShuttleControl::parameter_changed, this, "external-sync"), gui_context ());
UIConfiguration::instance ().ColorsChanged.connect (sigc::mem_fun (*this, &ShuttleControl::set_colors));
Timers::blink_connect (sigc::mem_fun (*this, &ShuttleControl::do_blink));
@ -768,7 +770,7 @@ ShuttleControl::parameter_changed (std::string p)
delete shuttle_context_menu;
shuttle_context_menu = 0;
} else if (p == "external-sync") {
if (_session->config.get_external_sync() || !Port::can_varispeed ()) {
if (!_session || _session->config.get_external_sync() || !Port::can_varispeed ()) {
_vari_dialog.hide ();
_vari_button.set_sensitive (false);
if (shuttle_grabbed) {

View File

@ -120,6 +120,7 @@ protected:
cairo_pattern_t* shine_pattern;
PBD::microseconds_t last_shuttle_request;
PBD::ScopedConnection parameter_connection;
PBD::ScopedConnection port_connection;
ShuttleInfoButton _info_button;
Gtk::Menu* shuttle_context_menu;
ArdourWidgets::BindingProxy binding_proxy;