Skip to content

Commit

Permalink
Fixed test regression
Browse files Browse the repository at this point in the history
  • Loading branch information
sadko4u committed Sep 3, 2023
1 parent 15050d7 commit 38c3670
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions src/main/sampling/helpers/playback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,9 @@ namespace lsp
{
switch (pb->enLoopMode)
{
case SAMPLE_LOOP_REVERSE_FULL_PP:
case SAMPLE_LOOP_DIRECT_FULL_PP:
// If current batch is in direct/reverse direction, then we need to process
// one more batch in the reverse/direct direction
// If current batch is in direct direction, then we need to process
// one more batch in the reverse direction
if (pb->bReverse)
{
if (s->nEnd < s->nStart)
Expand All @@ -293,6 +292,26 @@ namespace lsp
b->enType = BATCH_TAIL;
return;

case SAMPLE_LOOP_REVERSE_FULL_PP:
// If current batch is in reverse direction, then we need to process
// one more batch in the direct direction
if (pb->bReverse)
{
if (s->nStart < s->nEnd)
break;
b->nStart = pb->nLoopStart;
b->nEnd = 0;
}
else
{
if (s->nEnd < s->nStart)
break;
b->nStart = pb->nLoopEnd;
b->nEnd = sample_len;
}
b->enType = BATCH_TAIL;
return;

case SAMPLE_LOOP_DIRECT_SMART_PP:
case SAMPLE_LOOP_REVERSE_SMART_PP:
// If current batch is in reverse direction, then we need to process
Expand Down

0 comments on commit 38c3670

Please sign in to comment.