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
|
// 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
|
// hear the radio inside OpsLog. Source = the "From radio" capture device (for a
|
||||||
// USB-connected rig, its "USB Audio CODEC" input); sink = the "Listening"
|
// USB-connected rig, its "USB Audio CODEC" input); sink = the "Listening"
|
||||||
|
|||||||
+2
-2
@@ -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.",
|
"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.",
|
"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 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 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."
|
"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.",
|
"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.",
|
"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 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.",
|
"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."
|
"Le champ indicatif est plus large, la place venant de la paire RST."
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import {
|
|||||||
GetTunerGeniusSettings, SaveTunerGeniusSettings,
|
GetTunerGeniusSettings, SaveTunerGeniusSettings,
|
||||||
GetAmplifiers, SaveAmplifiers, GetAmpStatuses, AmpOperate,
|
GetAmplifiers, SaveAmplifiers, GetAmpStatuses, AmpOperate,
|
||||||
GetWinkeyerSettings, SaveWinkeyerSettings, ListSerialPorts,
|
GetWinkeyerSettings, SaveWinkeyerSettings, ListSerialPorts,
|
||||||
GetAudioSettings, SaveAudioSettings, ListAudioInputDevices, ListAudioOutputDevices, PickAudioFolder, TestPTT,
|
GetAudioSettings, SaveAudioSettings, AudioApplyLevels, ListAudioInputDevices, ListAudioOutputDevices, PickAudioFolder, TestPTT,
|
||||||
GetClublogCtyInfo, SetClublogCtyEnabled, DownloadClublogCty,
|
GetClublogCtyInfo, SetClublogCtyEnabled, DownloadClublogCty,
|
||||||
GetClublogMostWantedInfo, SetClublogMostWantedEnabled, DownloadClublogMostWanted,
|
GetClublogMostWantedInfo, SetClublogMostWantedEnabled, DownloadClublogMostWanted,
|
||||||
GetSecretStatus, SetPassphrase, RemovePassphrase,
|
GetSecretStatus, SetPassphrase, RemovePassphrase,
|
||||||
@@ -5115,13 +5115,13 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
|||||||
<Label className="text-sm">{t('aud.fromLevel')}</Label>
|
<Label className="text-sm">{t('aud.fromLevel')}</Label>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<input type="range" min={10} max={300} step={5} value={audioCfg.from_gain}
|
<input type="range" min={10} max={300} step={5} value={audioCfg.from_gain}
|
||||||
onChange={(e) => setAudioField({ from_gain: parseInt(e.target.value, 10) })} className="w-48 accent-primary" />
|
onChange={(e) => { const v = parseInt(e.target.value, 10); setAudioField({ from_gain: v }); AudioApplyLevels(v, audioCfg.mic_gain); }} className="w-48 accent-primary" />
|
||||||
<span className="font-mono text-xs w-12 text-right">{audioCfg.from_gain}%</span>
|
<span className="font-mono text-xs w-12 text-right">{audioCfg.from_gain}%</span>
|
||||||
</div>
|
</div>
|
||||||
<Label className="text-sm">{t('aud.micLevel')}</Label>
|
<Label className="text-sm">{t('aud.micLevel')}</Label>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<input type="range" min={10} max={300} step={5} value={audioCfg.mic_gain}
|
<input type="range" min={10} max={300} step={5} value={audioCfg.mic_gain}
|
||||||
onChange={(e) => setAudioField({ mic_gain: parseInt(e.target.value, 10) })} className="w-48 accent-primary" />
|
onChange={(e) => { const v = parseInt(e.target.value, 10); setAudioField({ mic_gain: v }); AudioApplyLevels(audioCfg.from_gain, v); }} className="w-48 accent-primary" />
|
||||||
<span className="font-mono text-xs w-12 text-right">{audioCfg.mic_gain}%</span>
|
<span className="font-mono text-xs w-12 text-right">{audioCfg.mic_gain}%</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Vendored
+2
@@ -61,6 +61,8 @@ export function ApplyAwardUpdate(arg1:string):Promise<void>;
|
|||||||
|
|
||||||
export function AssignAwardRefToQSOs(arg1:string,arg2:string,arg3:Array<number>):Promise<number>;
|
export function AssignAwardRefToQSOs(arg1:string,arg2:string,arg3:Array<number>):Promise<number>;
|
||||||
|
|
||||||
|
export function AudioApplyLevels(arg1:number,arg2:number):Promise<void>;
|
||||||
|
|
||||||
export function AudioMonitorActive():Promise<boolean>;
|
export function AudioMonitorActive():Promise<boolean>;
|
||||||
|
|
||||||
export function AudioStartMonitor():Promise<void>;
|
export function AudioStartMonitor():Promise<void>;
|
||||||
|
|||||||
@@ -70,6 +70,10 @@ export function AssignAwardRefToQSOs(arg1, arg2, arg3) {
|
|||||||
return window['go']['main']['App']['AssignAwardRefToQSOs'](arg1, arg2, arg3);
|
return window['go']['main']['App']['AssignAwardRefToQSOs'](arg1, arg2, arg3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function AudioApplyLevels(arg1, arg2) {
|
||||||
|
return window['go']['main']['App']['AudioApplyLevels'](arg1, arg2);
|
||||||
|
}
|
||||||
|
|
||||||
export function AudioMonitorActive() {
|
export function AudioMonitorActive() {
|
||||||
return window['go']['main']['App']['AudioMonitorActive']();
|
return window['go']['main']['App']['AudioMonitorActive']();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user