From 0f6ce99e2bf4cc49b42c16cf7fbb4ac658179adb Mon Sep 17 00:00:00 2001 From: bnnm Date: Sun, 16 Jan 2022 23:04:35 +0100 Subject: [PATCH] Allow XA with emphasis flag, add .an2 [Croc (PS1)] --- src/formats.c | 1 + src/meta/xa.c | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/formats.c b/src/formats.c index 3761ba45..2883f8d9 100644 --- a/src/formats.c +++ b/src/formats.c @@ -65,6 +65,7 @@ static const char* extension_list[] = { "al2", "ams", //txth/reserved [Super Dragon Ball Z (PS2) ELF names] "amts", //fake extension/header id for .stm (renamed? to be removed?) + "an2", "ao", "ap", "apc", diff --git a/src/meta/xa.c b/src/meta/xa.c index 0227e440..e4645bb9 100644 --- a/src/meta/xa.c +++ b/src/meta/xa.c @@ -38,8 +38,9 @@ VGMSTREAM* init_vgmstream_xa(STREAMFILE* sf) { * .str: often videos and sometimes speech/music * .pxa: Mortal Kombat 4 (PS1) * .grn: Micro Machines (CDi) + * .an2: Croc (PS1) movies * (extensionless): bigfiles [Castlevania: Symphony of the Night (PS1)] */ - if (!check_extensions(sf,"xa,str,pxa,grn,")) + if (!check_extensions(sf,"xa,str,pxa,grn,an2,")) goto fail; /* Proper XA comes in raw (BIN 2352 mode2/form2) CD sectors, that contain XA subheaders. @@ -78,11 +79,11 @@ VGMSTREAM* init_vgmstream_xa(STREAMFILE* sf) { case 1: bps = 8; break; /* Micro Machines (CDi) */ default: goto fail; } - switch((xa_header >> 6) & 1) { /* 6: emphasis (applies a filter) */ + switch((xa_header >> 6) & 1) { /* 6: emphasis flag (should apply a de-emphasis filter) */ case 0: break; - default: /* shouldn't be used by games */ - vgm_logi("XA: unknown emphasis found\n"); - goto fail; + default: /* very rare, waveform looks ok so maybe not needed [Croc (PS1) PACKx.str] */ + vgm_logi("XA: emphasis found\n"); + break; } switch((xa_header >> 7) & 1) { /* 7: reserved */ case 0: break;