Add additional check for no loops in PS2 ADS for Rune Princess.

git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@807 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
snakemeat 2010-06-18 18:10:16 +00:00
parent 2abcd5c0f0
commit f1cb9ca7ef

View File

@ -45,9 +45,17 @@ VGMSTREAM * init_vgmstream_ps2_ads(STREAMFILE *streamFile) {
streamSize = get_streamfile_size(streamFile) - 0x28;
}
/* check loop */
loop_flag = (read_32bitLE(0x1C,streamFile)!=0xFFFFFFFF);
/* check loop */
if ((read_32bitLE(0x1C,streamFile) == 0xFFFFFFFF) ||
((read_32bitLE(0x18,streamFile) == 0) && (read_32bitLE(0x1C,streamFile) == 0)))
{
loop_flag = 0;
}
else
{
loop_flag = 1;
}
channel_count=read_32bitLE(0x10,streamFile);
/* build the VGMSTREAM */