forked from len0rd/rockbox
MIDI: Fix two year old loop bug that caused distortion on some instruments. I been looking for this one
for at least 6 months. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14896 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
23a89b06ab
commit
d1e306077f
1 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue