Lynx: sample looping
This commit is contained in:
parent
d6282c6949
commit
9d6d84a87f
|
@ -157,8 +157,13 @@ void DivPlatformLynx::acquire(short* bufL, short* bufR, size_t start, size_t len
|
||||||
} else {
|
} else {
|
||||||
WRITE_OUTPUT(i,(s->data8[chan[i].samplePos++]*chan[i].outVol)>>7);
|
WRITE_OUTPUT(i,(s->data8[chan[i].samplePos++]*chan[i].outVol)>>7);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chan[i].samplePos>=(int)s->samples) {
|
if (chan[i].samplePos>=(int)s->samples) {
|
||||||
chan[i].sample=-1;
|
if (s->loopStart>=0 && s->loopStart<(int)s->samples) {
|
||||||
|
chan[i].samplePos=s->loopStart;
|
||||||
|
} else {
|
||||||
|
chan[i].sample=-1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue