Merge pull request #245 from AnonBaiter/patch-1

vgmstream fix number 1
This commit is contained in:
Christopher Snowhill 2018-07-10 23:47:07 -07:00 committed by GitHub
commit b5353846e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,7 @@ VGMSTREAM * init_vgmstream_ps2_vpk(STREAMFILE *streamFile) {
/* Check for Compression Scheme */
vgmstream->coding_type = coding_PSX;
vgmstream->num_samples = read_32bitLE(0x04,streamFile)/16*28;
vgmstream->num_samples = ps_bytes_to_samples(read_32bitLE(0x04,streamFile),vgmstream->channels);
/* Get loop point values */
if(vgmstream->loop_flag) {
@ -42,7 +42,7 @@ VGMSTREAM * init_vgmstream_ps2_vpk(STREAMFILE *streamFile) {
vgmstream->loop_end_sample = vgmstream->num_samples;
}
vgmstream->interleave_block_size = read_32bitLE(0x0C,streamFile)/2;
vgmstream->interleave_block_size = read_32bitLE(0x0C,streamFile)/vgmstream->channels;
vgmstream->layout_type = layout_interleave;
vgmstream->meta_type = meta_PS2_VPK;