fix: the audio level sliders did nothing until Settings were saved
Reported again after the monitor was wired up: 300% still sounded like 10%. The monitor fix was right but could not show, because the sliders only changed the settings panel's own state — the value reached the audio engine when the operator clicked Save. A level is set by ear, by dragging. It now applies on every move, to the monitor and to the recorder mix alike; saving still persists it. Both halves were needed and neither works alone.
This commit is contained in:
@@ -8901,6 +8901,30 @@ func (a *App) DVKStop() {
|
||||
}
|
||||
}
|
||||
|
||||
// AudioApplyLevels applies the RX and mic levels IMMEDIATELY, without saving.
|
||||
//
|
||||
// A level is set by ear, by dragging: the sliders only touched the settings
|
||||
// panel state, so the value reached the audio engine when the operator clicked
|
||||
// Save — and while they were listening and dragging, 10%% sounded exactly like
|
||||
// 300%%. The control was not weak, it was not connected to anything yet.
|
||||
//
|
||||
// Persisting still happens on Save. This is the live half.
|
||||
func (a *App) AudioApplyLevels(fromPct, micPct int) {
|
||||
if a.audioMgr != nil {
|
||||
a.audioMgr.SetMonitorGain(fromPct)
|
||||
}
|
||||
if a.qsoRec != nil {
|
||||
f, m := float64(fromPct)/100, float64(micPct)/100
|
||||
if fromPct <= 0 {
|
||||
f = 1
|
||||
}
|
||||
if micPct <= 0 {
|
||||
m = 1
|
||||
}
|
||||
a.qsoRec.SetGains(f, m)
|
||||
}
|
||||
}
|
||||
|
||||
// AudioStartMonitor pipes live RX audio from the rig into your speakers so you
|
||||
// hear the radio inside OpsLog. Source = the "From radio" capture device (for a
|
||||
// USB-connected rig, its "USB Audio CODEC" input); sink = the "Listening"
|
||||
|
||||
Reference in New Issue
Block a user