Skip to content

Commit 2adcbf0

Browse files
committed
Check pitch threshold across full buffer
1 parent b2cc96d commit 2adcbf0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/base/URecord.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,9 @@ procedure TCaptureBuffer.AnalyzeBuffer;
378378
LockAnalysisBuffer();
379379
try
380380

381-
// find maximum volume of first 1024 samples
381+
// find maximum volume across the analysis buffer
382382
MaxVolume := 0;
383-
for SampleIndex := 0 to 1023 do
383+
for SampleIndex := 0 to AnalysisBufferSize - 1 do
384384
begin
385385
Volume := Abs(AnalysisBuffer[SampleIndex]) / -Low(Smallint);
386386
if Volume > MaxVolume then

0 commit comments

Comments
 (0)