We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 320ae76 commit 00cd4feCopy full SHA for 00cd4fe
1 file changed
src/base/URecord.pas
@@ -378,9 +378,9 @@ procedure TCaptureBuffer.AnalyzeBuffer;
378
LockAnalysisBuffer();
379
try
380
381
- // find maximum volume of first 1024 samples
+ // find maximum volume across the analysis buffer
382
MaxVolume := 0;
383
- for SampleIndex := 0 to 1023 do
+ for SampleIndex := 0 to AnalysisBufferSize - 1 do
384
begin
385
Volume := Abs(AnalysisBuffer[SampleIndex]) / -Low(Smallint);
386
if Volume > MaxVolume then
0 commit comments