diff --git a/src/meta/fsb_test.c b/src/meta/fsb_test.c index 24d3f51f..eb5286ca 100644 --- a/src/meta/fsb_test.c +++ b/src/meta/fsb_test.c @@ -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); diff --git a/src/meta/ps2_sfs.c b/src/meta/ps2_sfs.c index ce966af4..825e675f 100644 --- a/src/meta/ps2_sfs.c +++ b/src/meta/ps2_sfs.c @@ -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; }