mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-29 00:34:33 +01:00
better checking in xbox_wvs.c
fixed missing meta info git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@397 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
parent
1742eb818c
commit
2293618115
@ -18,6 +18,11 @@ VGMSTREAM * init_vgmstream_xbox_wvs(STREAMFILE *streamFile) {
|
||||
streamFile->get_name(streamFile,filename,sizeof(filename));
|
||||
if (strcasecmp("wvs",filename_extension(filename))) goto fail;
|
||||
|
||||
if((read_16bitLE(0x0C,streamFile)!=0x69) &&
|
||||
(read_16bitLE(0x08,streamFile)!=0x4400) &&
|
||||
(read_32bitLE(0x0,streamFile)!=get_streamfile_size(streamFile)+0x20))
|
||||
goto fail;
|
||||
|
||||
/* Loop seems to be set if offset(0x0A) == 0x472C */
|
||||
loop_flag = (read_16bitLE(0x0A,streamFile)==0x472C);
|
||||
|
||||
@ -37,7 +42,7 @@ VGMSTREAM * init_vgmstream_xbox_wvs(STREAMFILE *streamFile) {
|
||||
vgmstream->num_samples = read_32bitLE(0,streamFile) / 36 * 64 / vgmstream->channels;
|
||||
vgmstream->layout_type = layout_interleave;
|
||||
vgmstream->interleave_block_size=36;
|
||||
vgmstream->meta_type = meta_XBOX_WAVM;
|
||||
vgmstream->meta_type = meta_XBOX_WVS;
|
||||
|
||||
if(loop_flag) {
|
||||
vgmstream->loop_start_sample=0;
|
||||
|
@ -1589,6 +1589,9 @@ void describe_vgmstream(VGMSTREAM * vgmstream, char * desc, int length) {
|
||||
break;
|
||||
case meta_PS2_TEC:
|
||||
snprintf(temp,TEMPSIZE,"assumed TECMO badflagged stream by .tec extension");
|
||||
break;
|
||||
case meta_XBOX_WVS:
|
||||
snprintf(temp,TEMPSIZE,"Metal Arms WVS Header");
|
||||
break;
|
||||
default:
|
||||
snprintf(temp,TEMPSIZE,"THEY SHOULD HAVE SENT A POET");
|
||||
|
@ -224,6 +224,7 @@ typedef enum {
|
||||
|
||||
meta_XBOX_WAVM, /* XBOX WAVM File */
|
||||
meta_XBOX_RIFF, /* XBOX RIFF/WAVE File */
|
||||
meta_XBOX_WVS, /* XBOX WVS */
|
||||
|
||||
meta_EAXA_R2, /* EA XA Release 2 */
|
||||
meta_EAXA_R3, /* EA XA Release 3 */
|
||||
|
Loading…
Reference in New Issue
Block a user