diff options
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/midi/synth.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/plugins/midi/synth.c b/apps/plugins/midi/synth.c index d053ebf..d6fda78 100644 --- a/apps/plugins/midi/synth.c +++ b/apps/plugins/midi/synth.c @@ -297,13 +297,13 @@ signed short int synthVoice(struct SynthObject * so) { if(wf->mode & LOOP_REVERSE) { - so->cp = (wf->endLoop)<<FRACTSIZE; - cpShifted = wf->endLoop; + cpShifted = wf->endLoop-(wf->startLoop-cpShifted); + so->cp = (cpShifted)<<FRACTSIZE; s2=getSample((cpShifted), wf); } else { - so->delta = -so->delta; + so->delta = -so->delta; /* At this point cpShifted is wrong. We need to take a step */ so->loopDir = LOOPDIR_FORWARD; } } @@ -313,8 +313,8 @@ signed short int synthVoice(struct SynthObject * so) so->loopState = STATE_LOOPING; if((wf->mode & (24)) == 0) { - so->cp = (wf->startLoop)<<FRACTSIZE; - cpShifted = wf->startLoop; + cpShifted = wf->startLoop + (cpShifted-wf->endLoop); + so->cp = (cpShifted)<<FRACTSIZE; s2=getSample((cpShifted), wf); } else |