mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-18 07:44:43 +01:00
Fix XA missing num_samples at the end
This commit is contained in:
parent
fd7ecbd393
commit
b71739de5e
@ -146,10 +146,9 @@ void decode_xa(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, i
|
|||||||
|
|
||||||
size_t xa_bytes_to_samples(size_t bytes, int channels, int is_blocked) {
|
size_t xa_bytes_to_samples(size_t bytes, int channels, int is_blocked) {
|
||||||
if (is_blocked) {
|
if (is_blocked) {
|
||||||
//todo with -0x10 misses the last sector, not sure if bug or feature
|
return (bytes / 0x930) * (28*8/ channels) * 18;
|
||||||
return ((bytes - 0x10) / 0x930) * (0x900 - 18*0x10) * 2 / channels;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return ((bytes / 0x80)*0xE0) / 2;
|
return (bytes / 0x80) * (28*8 / channels) * 18;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user