Skip to content

Commit 80cc72d

Browse files
committed
loopCount calculation fixed. (+ 1 was removed)
1 parent 601cb90 commit 80cc72d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sample/sfextractsample.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function extractGenerator($gen, $looptime) {
7171
} else {
7272
$startLoop = $sample['StartLoop'];
7373
$endLoop = $sample['EndLoop'];
74-
$loopCount = $looptime * $sampleRate / ($endLoop - $startLoop + 1);
74+
$loopCount = $looptime * $sampleRate / ($endLoop - $startLoop /*+ 1*/);
7575
$loopCount = ceil($loopCount); // round up
7676
$sampleData = substr($data, $start * 2 , ($startLoop - $start) * 2);
7777
$sampleData .= str_repeat(substr($data, $startLoop * 2 , ($endLoop - $startLoop /*+ 1*/) * 2), $loopCount);

0 commit comments

Comments
 (0)