mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-12-01 01:27:20 +01:00
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:
parent
adf4677894
commit
4ccc8282b0
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user