Loop stuff fix for .sfs

git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@708 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
manakoAT 2009-10-06 17:30:04 +00:00
parent adf4677894
commit 4ccc8282b0
2 changed files with 7 additions and 2 deletions

View File

@ -25,7 +25,12 @@ VGMSTREAM * init_vgmstream_fsb3(STREAMFILE *streamFile) {
(read_32bitBE(0x10,streamFile) != 0x01000300))
goto fail;
loop_flag = 0; // for now...
if (read_32bitBE(0x48,streamFile) == 0x02000806) { // Metroid Prime 3
loop_flag = 1;
} else {
loop_flag = 0; /* (read_32bitLE(0x08,streamFile)!=0); */
}
channel_count = read_16bitLE(0x56,streamFile);
fsb_headerlen = read_32bitLE(0x08,streamFile);

View File

@ -31,7 +31,7 @@ VGMSTREAM * init_vgmstream_sfs(STREAMFILE *streamFile) {
vgmstream->coding_type = coding_PSX;
vgmstream->num_samples = (read_32bitLE(0x04,streamFile)*2)*28/16/channel_count;
if (loop_flag) {
vgmstream->loop_start_sample = (read_32bitLE(0x08,streamFile)*2)*28/16/channel_count;
vgmstream->loop_start_sample = read_32bitLE(0x08,streamFile)*28/16/channel_count;
vgmstream->loop_end_sample = (read_32bitLE(0x04,streamFile)*2)*28/16/channel_count;
}