fix: a level set by the slider was lost when a recording started
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.
This commit is contained in:
@@ -8910,6 +8910,18 @@ func (a *App) DVKStop() {
|
|||||||
//
|
//
|
||||||
// Persisting still happens on Save. This is the live half.
|
// Persisting still happens on Save. This is the live half.
|
||||||
func (a *App) AudioApplyLevels(fromPct, micPct int) {
|
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 {
|
if a.audioMgr != nil {
|
||||||
a.audioMgr.SetMonitorGain(fromPct)
|
a.audioMgr.SetMonitorGain(fromPct)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user