Removed switch (it doesn't like me), fixed support for mono files.

git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@768 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
bxaimc 2010-03-30 04:02:37 +00:00
parent eb17ddd68c
commit bb9985e6e6

View File

@ -9,7 +9,6 @@ VGMSTREAM * init_vgmstream_ps2_vsf(STREAMFILE *streamFile) {
int loop_flag;
int channel_count;
int channel_switch;
/* check extension, case insensitive */
streamFile->get_name(streamFile,filename,sizeof(filename));
@ -20,15 +19,11 @@ VGMSTREAM * init_vgmstream_ps2_vsf(STREAMFILE *streamFile) {
goto fail;
loop_flag = (read_32bitLE(0x1c,streamFile)==0x13);
channel_switch = read_32bitLE(0x8,streamFile);
switch (channel_switch){
case 0x0:
channel_count = 1;
break;
case 0x02:
channel_count = 2;
break;
}
if(read_32bitLE(0x8,streamFile)==0x0)
channel_count = 1;
else
channel_count = 2;
/* build the VGMSTREAM */
vgmstream = allocate_vgmstream(channel_count,loop_flag);
if (!vgmstream) goto fail;