diff --git a/src/meta/xbox_wvs.c b/src/meta/xbox_wvs.c index 626d1b9f..c783184d 100644 --- a/src/meta/xbox_wvs.c +++ b/src/meta/xbox_wvs.c @@ -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; diff --git a/src/vgmstream.c b/src/vgmstream.c index 6c12dc1b..ec52eb75 100644 --- a/src/vgmstream.c +++ b/src/vgmstream.c @@ -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"); diff --git a/src/vgmstream.h b/src/vgmstream.h index 3f43cec5..e069551c 100644 --- a/src/vgmstream.h +++ b/src/vgmstream.h @@ -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 */