Skip to content

Commit

Permalink
Part of Issue #36 - Merge commit 'f3e2d0d' into 36-fd-prototype
Browse files Browse the repository at this point in the history
- bug fix - reading corrupt Pitch/Bandwidth from .INI file (e.g. Pitch=-1) results in bad audio.
- bug fix kludge - fix IDE hang in debug mode by calling NameThreadForDebugging() (no idea why this works)
- comments - update comments to bh1scw's prior work
  • Loading branch information
w7sst committed Sep 30, 2022
2 parents 0ebe6c5 + f3e2d0d commit 819c324
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Contest.pas
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function TContest.GetAudio: TSingleArray;
if Stations[i] is TDxStation then
with Stations[i] as TDxStation do
if (Oper.State = osDone) and (QsoList <> nil) and (MyCall = QsoList[High(QsoList)].Call) then begin
DataToLastQso;
DataToLastQso; // deletes this TDxStation from Stations[]
//with MainForm.RichEdit1.Lines do Delete(Count-1);
// Delete(Count-1);
//Log.LastQsoToScreen;
Expand Down
3 changes: 2 additions & 1 deletion DxStn.pas
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ procedure TDxStation.DataToLastQso;
TrueNR := Self.NR;
TrueOpName := Self.OpName;
end;
Free;

Free; // removes Self from Stations[] container
end;


Expand Down
8 changes: 6 additions & 2 deletions Main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -692,16 +692,20 @@ procedure TMainForm.SetMyCall(ACall: string);

procedure TMainForm.SetPitch(PitchNo: integer);
begin
PitchNo := Max(0, Min(PitchNo, ComboBox1.Items.Count-1));
Ini.Pitch := 300 + PitchNo * 50;
ComboBox1.ItemIndex := PitchNo;
Tst.Modul.CarrierFreq := Ini.Pitch;
end;


{
Set bandwidth based on menu item number.
Must be within range [0, ComboBox2.Items.Count).
}
procedure TMainForm.SetBw(BwNo: integer);
begin
if (BwNo < 0) or (BwNo >= ComboBox2.Items.Count) then Exit;

BwNo := Max(0, Min(BwNo, ComboBox2.Items.Count-1));
Ini.Bandwidth := 100 + BwNo * 50;
ComboBox2.ItemIndex := BwNo;

Expand Down
5 changes: 3 additions & 2 deletions VCL/SndCustm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,9 @@ procedure TCustomSoundInOut.DoSetEnabled(AEnabled: boolean);
FThread:= TWaitThread.Create(true);
FThread.FreeOnTerminate:= true;
FThread.Owner := Self;
//FThread.Priority := tpTimeCritical;
//start
FThread.Priority := tpTimeCritical; // don't starve the WaveOut device
FThread.NameThreadForDebugging('TWaitThread'); // without this, IDE will hang
//start audio output device
FEnabled:= true;
try
Start;
Expand Down

0 comments on commit 819c324

Please sign in to comment.