diff --git a/src/web/server.py b/src/web/server.py index 6e4a69e..18a7c15 100644 --- a/src/web/server.py +++ b/src/web/server.py @@ -1491,6 +1491,12 @@ class WebServer: # Update LATENCY_PROFILES with custom entry so latency_profile resolves it LATENCY_PROFILES[effective_key] = target_profile + # Sync AudioConfig overrides BEFORE JACK restart so latency_profile + # used by start_jack() returns the correct period. Without this, the + # stale boot-time self.period override stomps on the LATENCY_PROFILES entry. + audio_sys.config.period = target_profile["period"] + audio_sys.config.rate = target_profile["rate"] + # ── Kill JACK server FIRST (breaks any client deadlock) ── # jack.Client.deactivate() is a synchronous JACK protocol call # that blocks until the RT callback thread acknowledges. If the