Skip to content

Commit 1e29025

Browse files
committed
Fixed sample indexing in crossover
1 parent 62d9196 commit 1e29025

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/util/Crossover.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ namespace lsp
454454

455455
for (size_t sample=0; sample < samples; )
456456
{
457-
size_t to_do = lsp_min(samples - sample, nBufSize);
457+
const size_t to_do = lsp_min(samples - sample, nBufSize);
458458
band_t *left = &vBands[0];
459459
const float *src = in;
460460

@@ -491,7 +491,7 @@ namespace lsp
491491

492492
// Update pointers
493493
in += to_do;
494-
sample -= to_do;
494+
sample += to_do;
495495
}
496496
}
497497

0 commit comments

Comments
 (0)