This commit is contained in:
bnnm 2024-05-11 15:32:51 +02:00
parent 9b1e3369f7
commit ec151b55b0
2 changed files with 12 additions and 14 deletions

View File

@ -603,6 +603,7 @@ VGMSTREAM * init_vgmstream_ea_hdr_dat(STREAMFILE * streamFile);
VGMSTREAM * init_vgmstream_ea_hdr_dat_v2(STREAMFILE * streamFile);
VGMSTREAM * init_vgmstream_ea_map_mus(STREAMFILE * steeamFile);
VGMSTREAM * init_vgmstream_ea_mpf_mus(STREAMFILE * steeamFile);
VGMSTREAM* load_vgmstream_ea_bnk(STREAMFILE* sf, off_t offset, int target_stream, int is_embedded);
VGMSTREAM * init_vgmstream_ea_schl_fixed(STREAMFILE * streamFile);
@ -1004,7 +1005,6 @@ VGMSTREAM* init_vgmstream_cbx(STREAMFILE* sf);
VGMSTREAM* init_vgmstream_vas_rockstar(STREAMFILE* sf);
VGMSTREAM* load_vgmstream_ea_bnk(STREAMFILE* sf, off_t offset, int target_stream, int is_embedded);
VGMSTREAM* init_vgmstream_ea_sbk(STREAMFILE* sf);
#endif /*_META_H*/

View File

@ -9,13 +9,13 @@
#define WAVEBANKENTRY_FLAGS_IGNORELOOP 0x00000008 // Used internally when the loop region can't be used (no idea...)
/* the x.x version is just to make it clearer, MS only classifies XACT as 1/2/3 */
#define XACT1_0_MAX 1 /* Project Gotham Racing 2 (v1), Silent Hill 4 (v1), Shin Megami Tensei NINE (v1) */
#define XACT1_1_MAX 3 /* Unreal Championship (v2), The King of Fighters 2003 (v3) */
#define XACT2_0_MAX 34 /* Dead or Alive 4 (v17), Kameo (v23), Table Tennis (v34) */ // v35/36/37 too?
#define XACT2_1_MAX 38 /* Prey (v38) */ // v39 too?
#define XACT2_2_MAX 41 /* Blue Dragon (v40) */
#define XACT3_0_MAX 46 /* Ninja Blade (t43 v42), Persona 4 Ultimax NESSICA (t45 v43) */
#define XACT_TECHLAND 0x10000 /* Sniper Ghost Warrior, Nail'd (PS3/X360), equivalent to XACT3_0 */
#define XACT1_0_MAX 1 /* Project Gotham Racing 2 (Xbox)-v01, Silent Hill 4 (Xbox)-v01, Shin Megami Tensei NINE (Xbox)-v01 */
#define XACT1_1_MAX 3 /* Unreal Championship (Xbox)-v02, The King of Fighters 2003 (Xbox)-v03 */
#define XACT2_0_MAX 34 /* Project Gotham Racing 3 (X360)-v22, Dead or Alive 4 (X360)-v23, Table Tennis (X360)-v34 */ // v35/36/37 too?
#define XACT2_1_MAX 38 /* Prey (X360)-v38 */
#define XACT2_2_MAX 41 /* Just Cause (X360)-v39, Blue Dragon (X360)-v40 */
#define XACT3_0_MAX 46 /* Ninja Blade (X360)-t43-v42, Saints Row 2 (PC)-t44-v42, Persona 4 Ultimax NESSICA (PC)-t45-v43, BlazBlue (X360)-t46-v44 */
#define XACT_TECHLAND 0x10000 /* Sniper Ghost Warrior (PS3/X360), Nail'd (PS3/X360), equivalent to XACT3_0 */
#define XACT_CRACKDOWN 0x87 /* Crackdown 1, equivalent to XACT2_2 */
static const int wma_avg_bps_index[7] = {
@ -91,7 +91,7 @@ VGMSTREAM* init_vgmstream_xwb(STREAMFILE* sf) {
/* checks */
if (!is_id32be(0x00,sf, "WBND") &&
!is_id32le(0x00,sf, "WBND")) /* X360 */
goto fail;
return NULL;
/* .xwb: standard
* .xna: Touhou Makukasai ~ Fantasy Danmaku Festival (PC)
@ -99,7 +99,7 @@ VGMSTREAM* init_vgmstream_xwb(STREAMFILE* sf) {
* .hwb: Burnout Revenge (X360)
* .bd: Fatal Frame 2 (Xbox) */
if (!check_extensions(sf,"xwb,xna,hwb,bd,"))
goto fail;
return NULL;
xwb.little_endian = is_id32be(0x00,sf, "WBND"); /* Xbox/PC */
if (xwb.little_endian) {
@ -409,7 +409,7 @@ VGMSTREAM* init_vgmstream_xwb(STREAMFILE* sf) {
}
else if ((xwb.version <= XACT2_1_MAX && (xwb.codec == XMA1 || xwb.codec == XMA2) && xwb.loop_flag)
|| (xwb.version == XACT_TECHLAND && xwb.codec == XMA2)) {
/* v38: byte offset, v40+: sample offset, v39: ? */
/* v38: byte offset, v39/v40+: sample offset */
/* need to manually find sample offsets, thanks to Microsoft's dumb headers */
ms_sample_data msd = {0};
@ -587,7 +587,6 @@ VGMSTREAM* init_vgmstream_xwb(STREAMFILE* sf) {
break;
}
#ifdef VGM_USE_ATRAC9
case ATRAC9_RIFF: { /* Stardew Valley (Vita) extension */
VGMSTREAM *temp_vgmstream = NULL;
STREAMFILE* temp_sf = NULL;
@ -610,7 +609,6 @@ VGMSTREAM* init_vgmstream_xwb(STREAMFILE* sf) {
close_vgmstream(vgmstream);
return temp_vgmstream;
}
#endif
default:
goto fail;
@ -619,7 +617,7 @@ VGMSTREAM* init_vgmstream_xwb(STREAMFILE* sf) {
start_offset = xwb.stream_offset;
if ( !vgmstream_open_stream(vgmstream,sf,start_offset) )
if (!vgmstream_open_stream(vgmstream,sf,start_offset))
goto fail;
return vgmstream;