mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-25 23:25:40 +00:00
Fixed MPEG music looping glitch.
This commit is contained in:
parent
bb89bc8e54
commit
383e6ac85c
|
@ -99,14 +99,18 @@ 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
|
||||
} //
|
||||
|
||||
offset = 0;
|
||||
fstart = lstart;
|
||||
end = lend;
|
||||
}
|
||||
|
||||
fstart = lstart;
|
||||
offset = 0;
|
||||
end = lend;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue