mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-22 13:55:38 +00:00
Fixed MPEG music looping glitch.
This commit is contained in:
parent
bb89bc8e54
commit
383e6ac85c
|
@ -99,16 +99,20 @@ int m1fread(unsigned char *buf, int size1, int size2, void *f)
|
|||
// if past the end, do the xfer in 2 pieces
|
||||
if ((total + offset) > end)
|
||||
{
|
||||
memcpy(buf, fstart + offset, end-offset);
|
||||
buf += (end-offset);
|
||||
total -= (end-offset);
|
||||
}
|
||||
int temp = end - offset; // this part could be removed
|
||||
if (temp > 0) // since music lenght
|
||||
{ //
|
||||
memcpy(buf, fstart + offset, temp); // always multiple
|
||||
buf += temp; // of 0x240
|
||||
total -= temp; // I let this as is in case
|
||||
} //
|
||||
|
||||
fstart = lstart;
|
||||
offset = 0;
|
||||
fstart = lstart;
|
||||
end = lend;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(buf, fstart + offset, total);
|
||||
|
||||
|
|
Loading…
Reference in a new issue