Added looping for MPEG FSB (WIP)

git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@852 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
bxaimc 2010-09-16 17:29:45 +00:00
parent bcbfeaac14
commit 775dc7d72a

View File

@ -397,8 +397,13 @@ VGMSTREAM * init_vgmstream_fsb_mpeg(STREAMFILE *streamFile) {
mp3ID = read_8bit(start_offset,streamFile);
if (mp3ID != 0xFF)
goto fail;
/* Still WIP */
if (read_32bitBE(0x80,streamFile)==0x53594E43)
loop_flag = 1;
else
loop_flag = 0;
loop_flag=0;
num_samples = (read_32bitLE(0x5C,streamFile));
#ifdef VGM_USE_MPEG
@ -421,6 +426,12 @@ VGMSTREAM * init_vgmstream_fsb_mpeg(STREAMFILE *streamFile) {
vgmstream->sample_rate = sample_rate;
vgmstream->num_samples = num_samples;
vgmstream->channels = channel_count;
/* Still WIP */
if (loop_flag) {
vgmstream->loop_start_sample = read_32bitLE(0x58,streamFile);
vgmstream->loop_end_sample = read_32bitLE(0x5c,streamFile);
}
vgmstream->meta_type = meta_FSB_MPEG;
#ifdef VGM_USE_MPEG