Fix audio device not restored in settings: suppress callbacks during RefreshAudioDevices

RefreshAudioDevices was firing OnRXDevChange/OnTXDevChange when restoring
the combo selection, which called ApplyAudioDevice(-1,'') and wiped
FAudioOutDevName/FAudioInDevName before LoadValues could use them.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-26 19:47:35 +03:00
co-authored by Claude Sonnet 4.6
parent 4a84cce6e2
commit 3b62a502e2
+2
View File
@@ -2051,6 +2051,7 @@ var
OldTXSel: string; OldTXSel: string;
begin begin
Names := TStringList.Create; Names := TStringList.Create;
FLoading := True;
try try
if AudioOut <> nil then if AudioOut <> nil then
begin begin
@@ -2098,6 +2099,7 @@ begin
else FCmbTXDev.ItemIndex := 0; else FCmbTXDev.ItemIndex := 0;
end; end;
finally finally
FLoading := False;
Names.Free; Names.Free;
end; end;
end; end;