From 2b61f437806113b78f3df337e21fa81393185d2a Mon Sep 17 00:00:00 2001 From: rouggy Date: Fri, 31 Jul 2026 21:04:20 +0200 Subject: [PATCH] fix: a level set by the slider was lost when a recording started MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The monitor followed the slider, but two takes made at 10% and 300% came out identical: starting a recording re-reads the STORED settings and calls SetGains with them, so the live value was overwritten the moment a take began. The slider now persists as it applies. Saving Settings still works as before — this only means the stored value is already right when a take starts, which is what every path downstream reads. --- app.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app.go b/app.go index fa6cf2b..06253c4 100644 --- a/app.go +++ b/app.go @@ -8910,6 +8910,18 @@ func (a *App) DVKStop() { // // Persisting still happens on Save. This is the live half. func (a *App) AudioApplyLevels(fromPct, micPct int) { + // PERSIST as well as apply. Starting a recording re-reads the stored + // settings and calls SetGains with them, so a live-only value was thrown + // away the moment a take began: the monitor followed the slider while two + // recordings made at 10%% and 300%% came out identical. + if a.settings != nil { + if fromPct > 0 { + _ = a.settings.Set(a.ctx, keyAudioFromGain, strconv.Itoa(fromPct)) + } + if micPct > 0 { + _ = a.settings.Set(a.ctx, keyAudioMicGain, strconv.Itoa(micPct)) + } + } if a.audioMgr != nil { a.audioMgr.SetMonitorGain(fromPct) }