mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-12-01 09:37:21 +01:00
Fix filename paths + Burnout's H/L vehicle sounds for other platforms
This commit is contained in:
parent
99196a43d5
commit
254c9f6eb1
@ -218,6 +218,7 @@ static const char* extension_list[] = {
|
|||||||
"hab",
|
"hab",
|
||||||
"hca",
|
"hca",
|
||||||
"hdr",
|
"hdr",
|
||||||
|
"hdt",
|
||||||
"hgc1",
|
"hgc1",
|
||||||
"his",
|
"his",
|
||||||
"hps",
|
"hps",
|
||||||
@ -231,6 +232,7 @@ static const char* extension_list[] = {
|
|||||||
"hxg",
|
"hxg",
|
||||||
"hxx",
|
"hxx",
|
||||||
"hwas",
|
"hwas",
|
||||||
|
"hwb",
|
||||||
"hwd",
|
"hwd",
|
||||||
|
|
||||||
"iab",
|
"iab",
|
||||||
@ -291,6 +293,7 @@ static const char* extension_list[] = {
|
|||||||
"lasf", //fake extension for .asf (various)
|
"lasf", //fake extension for .asf (various)
|
||||||
"lbin", //fake extension for .bin (various)
|
"lbin", //fake extension for .bin (various)
|
||||||
"ldat", //fake extension for .dat
|
"ldat", //fake extension for .dat
|
||||||
|
"ldt",
|
||||||
"leg",
|
"leg",
|
||||||
"lep",
|
"lep",
|
||||||
"lflac", //fake extension for .flac, FFmpeg/not parsed
|
"lflac", //fake extension for .flac, FFmpeg/not parsed
|
||||||
|
@ -19,7 +19,8 @@ VGMSTREAM* init_vgmstream_awd(STREAMFILE* sf) {
|
|||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
/* .awd: standard (Black, Burnout series, Call of Duty: Finest Hour)
|
/* .awd: standard (Black, Burnout series, Call of Duty: Finest Hour)
|
||||||
* .hwd/lwd: high/low vehicle engine sounds (Burnout series) */
|
* .hwd/lwd: high/low vehicle engine sounds (Burnout series)
|
||||||
|
* (Burnout 3: Takedown, Burnout Revenge, Burnout Dominator) */
|
||||||
if (!check_extensions(sf, "awd,hwd,lwd"))
|
if (!check_extensions(sf, "awd,hwd,lwd"))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
@ -38,17 +39,18 @@ VGMSTREAM* init_vgmstream_awd(STREAMFILE* sf) {
|
|||||||
if (data_offset != data_offset_2)
|
if (data_offset != data_offset_2)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
header_name_offset = wavedict_offset + 0x04;
|
header_name_offset = read_u32(wavedict_offset + 0x04, sf);
|
||||||
linked_list_offset = wavedict_offset + 0x0C;
|
|
||||||
|
|
||||||
if (header_name_offset) /* not used in Black */
|
if (header_name_offset) /* not used in Black */
|
||||||
read_string(header_name, STREAM_NAME_SIZE, header_name_offset, sf);
|
read_string(header_name, STREAM_NAME_SIZE, header_name_offset, sf);
|
||||||
|
|
||||||
if (target_subsong == 0)
|
if (!target_subsong)
|
||||||
target_subsong = 1;
|
target_subsong = 1;
|
||||||
|
|
||||||
/* Linked lists have no total subsong count; instead iterating
|
/* Linked lists have no total subsong count; instead iterating
|
||||||
* through all of them, until it returns to the 1st song again */
|
* through all of them, until it returns to the 1st song again */
|
||||||
|
linked_list_offset = wavedict_offset + 0x0C;
|
||||||
|
|
||||||
prev_dict_entry = read_u32(linked_list_offset + 0x00, sf);
|
prev_dict_entry = read_u32(linked_list_offset + 0x00, sf);
|
||||||
next_dict_entry = read_u32(linked_list_offset + 0x04, sf);
|
next_dict_entry = read_u32(linked_list_offset + 0x04, sf);
|
||||||
|
|
||||||
@ -69,14 +71,18 @@ VGMSTREAM* init_vgmstream_awd(STREAMFILE* sf) {
|
|||||||
stream_codec = read_u32(entry_info_offset + 0x14, sf);
|
stream_codec = read_u32(entry_info_offset + 0x14, sf);
|
||||||
stream_size = read_u32(entry_info_offset + 0x18, sf);
|
stream_size = read_u32(entry_info_offset + 0x18, sf);
|
||||||
bit_depth = read_8bit(entry_info_offset + 0x1C, sf);
|
bit_depth = read_8bit(entry_info_offset + 0x1C, sf);
|
||||||
channels = read_8bit(entry_info_offset + 0x1D, sf); /* always 1, haven't seen any stereo entries */
|
channels = read_8bit(entry_info_offset + 0x1D, sf); /* always 1, don't think stereo entries exist */
|
||||||
if (channels != 1)
|
if (channels != 1)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
/* stores a "00: GCN ADPCM Header" section, otherwise empty */
|
/* stores a "00: GCN ADPCM Header" chunk, otherwise empty */
|
||||||
misc_data_offset = read_u32(entry_info_offset + 0x20, sf);
|
misc_data_offset = read_u32(entry_info_offset + 0x20, sf);
|
||||||
misc_data_size = read_u32(entry_info_offset + 0x24, sf);
|
misc_data_size = read_u32(entry_info_offset + 0x24, sf);
|
||||||
|
|
||||||
|
/* entry_info_offset + 0x2C to +0x44 has the target format information,
|
||||||
|
* which in most cases would probably be identical to the input format
|
||||||
|
* variables (from sample_rate to misc_data_size) */
|
||||||
|
|
||||||
stream_offset = read_u32(entry_info_offset + 0x4C, sf) + data_offset;
|
stream_offset = read_u32(entry_info_offset + 0x4C, sf) + data_offset;
|
||||||
|
|
||||||
read_string(stream_name, STREAM_NAME_SIZE, entry_name_offset, sf);
|
read_string(stream_name, STREAM_NAME_SIZE, entry_name_offset, sf);
|
||||||
@ -106,12 +112,12 @@ VGMSTREAM* init_vgmstream_awd(STREAMFILE* sf) {
|
|||||||
snprintf(vgmstream->stream_name, STREAM_NAME_SIZE, "%s", stream_name);
|
snprintf(vgmstream->stream_name, STREAM_NAME_SIZE, "%s", stream_name);
|
||||||
|
|
||||||
switch (stream_codec) {
|
switch (stream_codec) {
|
||||||
case 0x00: /* PS2 (All Games) */
|
case 0x00: /* PS2 (Black, Burnout series, Call of Duty: Finest Hour) */
|
||||||
vgmstream->num_samples = ps_bytes_to_samples(stream_size, channels);
|
vgmstream->num_samples = ps_bytes_to_samples(stream_size, channels);
|
||||||
vgmstream->coding_type = coding_PSX;
|
vgmstream->coding_type = coding_PSX;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x01: /* Xbox (Black, Burnout) */
|
case 0x01: /* Xbox (Black, Burnout series) */
|
||||||
vgmstream->num_samples = pcm16_bytes_to_samples(stream_size, channels);
|
vgmstream->num_samples = pcm16_bytes_to_samples(stream_size, channels);
|
||||||
vgmstream->coding_type = coding_PCM16LE;
|
vgmstream->coding_type = coding_PCM16LE;
|
||||||
break;
|
break;
|
||||||
|
@ -294,10 +294,11 @@ VGMSTREAM* init_vgmstream_ea_bnk(STREAMFILE* sf) {
|
|||||||
|
|
||||||
/* check extension */
|
/* check extension */
|
||||||
/* .bnk: common
|
/* .bnk: common
|
||||||
* .sdt: Harry Potter games
|
* .sdt: Harry Potter games, Burnout games (PSP)
|
||||||
|
* .hdt/ldt: Burnout games (PSP)
|
||||||
* .abk: GoldenEye - Rogue Agent
|
* .abk: GoldenEye - Rogue Agent
|
||||||
* .ast: FIFA 2004 (inside .big) */
|
* .ast: FIFA 2004 (inside .big) */
|
||||||
if (!check_extensions(sf,"bnk,sdt,abk,ast"))
|
if (!check_extensions(sf,"bnk,sdt,hdt,ldt,abk,ast"))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (target_stream == 0) target_stream = 1;
|
if (target_stream == 0) target_stream = 1;
|
||||||
|
@ -96,8 +96,9 @@ VGMSTREAM* init_vgmstream_xwb(STREAMFILE* sf) {
|
|||||||
/* .xwb: standard
|
/* .xwb: standard
|
||||||
* .xna: Touhou Makukasai ~ Fantasy Danmaku Festival (PC)
|
* .xna: Touhou Makukasai ~ Fantasy Danmaku Festival (PC)
|
||||||
* (extensionless): Ikaruga (X360/PC), Grabbed by the Ghoulies (Xbox)
|
* (extensionless): Ikaruga (X360/PC), Grabbed by the Ghoulies (Xbox)
|
||||||
|
* .hwb: Burnout Revenge (X360)
|
||||||
* .bd: Fatal Frame 2 (Xbox) */
|
* .bd: Fatal Frame 2 (Xbox) */
|
||||||
if (!check_extensions(sf,"xwb,xna,bd,"))
|
if (!check_extensions(sf,"xwb,xna,hwb,bd,"))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
xwb.little_endian = is_id32be(0x00,sf, "WBND"); /* Xbox/PC */
|
xwb.little_endian = is_id32be(0x00,sf, "WBND"); /* Xbox/PC */
|
||||||
|
Loading…
Reference in New Issue
Block a user