Amiga: take loop pos into account
This commit is contained in:
parent
785f7e4d40
commit
31f8378cef
3 changed files with 19 additions and 2 deletions
|
|
@ -1314,7 +1314,7 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
|
|||
// reserved
|
||||
for (int j=0; j<3; j++) reader.readC();
|
||||
|
||||
if (ds.version>=18) {
|
||||
if (ds.version>=19) {
|
||||
sample->loopStart=reader.readI();
|
||||
} else {
|
||||
reader.readI();
|
||||
|
|
|
|||
|
|
@ -20,7 +20,11 @@ void DivPlatformAmiga::acquire(short* bufL, short* bufR, size_t start, size_t le
|
|||
chan[i].audDat=s->rendData[chan[i].audPos++]>>8;
|
||||
}
|
||||
if (chan[i].audPos>=s->rendLength) {
|
||||
chan[i].sample=-1;
|
||||
if (s->loopStart>=0 && s->loopStart<=(int)s->rendLength) {
|
||||
chan[i].audPos=s->loopStart;
|
||||
} else {
|
||||
chan[i].sample=-1;
|
||||
}
|
||||
}
|
||||
chan[i].audSub+=chan[i].freq;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue