Fixed MIHB sample calculation

git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@793 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
bxaimc 2010-05-09 19:46:31 +00:00
parent 44483958f0
commit 87a52ca673

View File

@ -31,10 +31,10 @@ VGMSTREAM * init_vgmstream_ps2_mihb(STREAMFILE *streamFile) {
vgmstream->channels = channel_count;
vgmstream->sample_rate = read_32bitLE(0x0C,streamFile);
vgmstream->coding_type = coding_PSX;
vgmstream->num_samples = ((read_32bitLE(0x10,streamFile))*mib_blocks)*28/16/channel_count;
vgmstream->num_samples = ((read_32bitLE(0x10,streamFile))*mib_blocks)*28/16;
if (loop_flag) {
vgmstream->loop_start_sample = 0;
vgmstream->loop_end_sample = ((read_32bitLE(0x10,streamFile))*mib_blocks)*28/16/channel_count;
vgmstream->loop_end_sample = ((read_32bitLE(0x10,streamFile))*mib_blocks)*28/16;
}