diff --git a/app.go b/app.go index 65fcc19..fa6cf2b 100644 --- a/app.go +++ b/app.go @@ -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" diff --git a/changelog.json b/changelog.json index d0ef41e..be4c2e7 100644 --- a/changelog.json +++ b/changelog.json @@ -7,7 +7,7 @@ "A playback that fails to start now says so in the log instead of ending silently after a tenth of a second.", "Replaying a recording before the previous one has finished now works: the new playback waits for the audio device to be free instead of keying the radio and releasing at once.", "The play button becomes a stop button while the recording is going out: it cuts the transmission and releases the PTT, and you can send it again straight away.", - "The \"From radio\" level now applies to what you HEAR through OpsLog, not only to recordings, and takes effect while the monitor is running.", + "The \"From radio\" and mic levels take effect as you drag the slider, and the RX level now applies to what you HEAR through OpsLog, not only to recordings.", "The padlocks on frequency, band, mode and times no longer flicker under the pointer and refuse the click.", "The callsign field is wider, taking the room from the RST pair." ], @@ -16,7 +16,7 @@ "Une lecture qui ne démarre pas le signale désormais dans le journal, au lieu de s'arrêter en silence au bout d'un dixième de seconde.", "Relancer un enregistrement avant la fin du précédent fonctionne désormais : la nouvelle lecture attend que le périphérique audio soit libre, au lieu de passer en émission et de relâcher aussitôt.", "Le bouton de lecture devient un bouton d'arrêt pendant l'émission de l'enregistrement : il coupe l'émission et relâche le PTT, et vous pouvez le renvoyer aussitôt.", - "Le niveau « From radio » agit désormais sur ce que vous ENTENDEZ dans OpsLog, et plus seulement sur les enregistrements ; il prend effet moniteur en marche.", + "Les niveaux « From radio » et micro agissent pendant que vous déplacez le curseur, et le niveau RX s'applique désormais à ce que vous ENTENDEZ dans OpsLog, pas seulement aux enregistrements.", "Les cadenas de fréquence, bande, mode et heures ne scintillent plus sous le curseur et acceptent le clic.", "Le champ indicatif est plus large, la place venant de la paire RST." ] diff --git a/frontend/src/components/SettingsModal.tsx b/frontend/src/components/SettingsModal.tsx index b1d0e1d..28cb4bf 100644 --- a/frontend/src/components/SettingsModal.tsx +++ b/frontend/src/components/SettingsModal.tsx @@ -16,7 +16,7 @@ import { GetTunerGeniusSettings, SaveTunerGeniusSettings, GetAmplifiers, SaveAmplifiers, GetAmpStatuses, AmpOperate, GetWinkeyerSettings, SaveWinkeyerSettings, ListSerialPorts, - GetAudioSettings, SaveAudioSettings, ListAudioInputDevices, ListAudioOutputDevices, PickAudioFolder, TestPTT, + GetAudioSettings, SaveAudioSettings, AudioApplyLevels, ListAudioInputDevices, ListAudioOutputDevices, PickAudioFolder, TestPTT, GetClublogCtyInfo, SetClublogCtyEnabled, DownloadClublogCty, GetClublogMostWantedInfo, SetClublogMostWantedEnabled, DownloadClublogMostWanted, GetSecretStatus, SetPassphrase, RemovePassphrase, @@ -5115,13 +5115,13 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan