mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-02-22 05:10:02 +01:00
Merge pull request #1421 from EdnessP/master
RIFF: WMA/LWMA extension + size check adjustment
This commit is contained in:
commit
a72c294ada
@ -604,12 +604,12 @@ static bool process_names(STREAMFILE* sf, bnk_header_t* h) {
|
||||
/* table4:
|
||||
* 0x00: bank name (optional)
|
||||
* 0x08: name section offset
|
||||
* 0x0C-0x14: 3 null pointers (reserved?)
|
||||
* 0x0C-0x18: 3 null pointers (reserved?)
|
||||
* 0x18-0x58: 32 name chunk offset indices
|
||||
*/
|
||||
|
||||
/* Name chunks are organised as
|
||||
* (name[0] + name[4] + name[8] + name[12]) & 0x1F;
|
||||
* (name[0] + name[4] + name[8] + name[12]) % 32;
|
||||
* and using that as the index for the chunk offsets
|
||||
* name_sect_offset + (chunk_idx[result] * 0x14);
|
||||
*/
|
||||
|
@ -397,8 +397,9 @@ VGMSTREAM* init_vgmstream_riff(STREAMFILE* sf) {
|
||||
* .xms: Ty the Tasmanian Tiger (Xbox)
|
||||
* .mus: Burnout Legends/Dominator (PSP)
|
||||
* .dat/ldat: RollerCoaster Tycoon 1/2 (PC)
|
||||
* .wma/lwma: SRS: Street Racing Syndicate (Xbox), Fast and the Furious (Xbox)
|
||||
*/
|
||||
if (!check_extensions(sf, "wav,lwav,xwav,mwv,da,dax,cd,med,snd,adx,adp,xss,xsew,adpcm,adw,wd,,sbv,wvx,str,at3,rws,aud,at9,ckd,saf,ima,nsa,pcm,xvag,ogg,logg,p1d,xms,mus,dat,ldat")) {
|
||||
if (!check_extensions(sf, "wav,lwav,xwav,mwv,da,dax,cd,med,snd,adx,adp,xss,xsew,adpcm,adw,wd,,sbv,wvx,str,at3,rws,aud,at9,ckd,saf,ima,nsa,pcm,xvag,ogg,logg,p1d,xms,mus,dat,ldat,wma,lwma")) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@ -415,6 +416,9 @@ VGMSTREAM* init_vgmstream_riff(STREAMFILE* sf) {
|
||||
else if (codec == 0x0069 && riff_size + 0x04 == file_size)
|
||||
riff_size -= 0x04; /* [Halo 2 (PC)] (possibly bad extractor? 'Gravemind Tool') */
|
||||
|
||||
else if (codec == 0x0069 && riff_size + 0x10 == file_size)
|
||||
riff_size += 0x08; /* [Fast and the Furious (Xbox)] ("HASH" chunk + 4 byte hash) */
|
||||
|
||||
else if (codec == 0x0000 && riff_size + 0x04 == file_size)
|
||||
riff_size -= 0x04; /* [Headhunter (DC), Bomber hehhe (DC)] */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user