mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-26 07:35: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 past the end, do the xfer in 2 pieces
|
||||||
if ((total + offset) > end)
|
if ((total + offset) > end)
|
||||||
{
|
{
|
||||||
memcpy(buf, fstart + offset, end-offset);
|
int temp = end - offset; // this part could be removed
|
||||||
buf += (end-offset);
|
if (temp > 0) // since music lenght
|
||||||
total -= (end-offset);
|
{ //
|
||||||
}
|
memcpy(buf, fstart + offset, temp); // always multiple
|
||||||
|
buf += temp; // of 0x240
|
||||||
|
total -= temp; // I let this as is in case
|
||||||
|
} //
|
||||||
|
|
||||||
fstart = lstart;
|
offset = 0;
|
||||||
offset = 0;
|
fstart = lstart;
|
||||||
end = lend;
|
end = lend;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue