Fix PTADPCM missing samples

This commit is contained in:
bnnm 2020-08-05 00:16:35 +02:00
parent dbbdc2c8d0
commit e6eae7e341

View File

@ -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);
}