mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-02-21 04:48:21 +01:00
Fix PTADPCM missing samples
This commit is contained in:
parent
dbbdc2c8d0
commit
e6eae7e341
@ -110,5 +110,5 @@ void decode_ptadpcm(VGMSTREAMCHANNEL *stream, sample_t *outbuf, int channelspaci
|
||||
|
||||
size_t ptadpcm_bytes_to_samples(size_t bytes, int channels, size_t frame_size) {
|
||||
if (channels <= 0 || frame_size < 0x06) return 0;
|
||||
return (bytes / channels / frame_size) * ((frame_size-0x05) * 2);
|
||||
return (bytes / (channels * frame_size)) * (2 + (frame_size-0x05) * 2);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user