From 2a5bc1ca7aee36cd763ac10c894b84eef347fe25 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 21 Nov 2024 14:08:02 -0500 Subject: Factor out "settings" that affect the execution process --- src/process.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/process.c') diff --git a/src/process.c b/src/process.c index 2f88316..3348877 100644 --- a/src/process.c +++ b/src/process.c @@ -120,8 +120,9 @@ jalv_run(Jalv* const jalv, const uint32_t nframes) // Check if it's time to send updates to the UI jalv->event_delta_t += nframes; - bool send_ui_updates = false; - uint32_t update_frames = (uint32_t)(jalv->sample_rate / jalv->ui_update_hz); + bool send_ui_updates = false; + const uint32_t update_frames = + (uint32_t)(jalv->settings.sample_rate / jalv->settings.ui_update_hz); if (jalv->has_ui && (jalv->event_delta_t > update_frames)) { send_ui_updates = true; jalv->event_delta_t = 0U; -- cgit v1.2.1