Allow XA with emphasis flag, add .an2 [Croc (PS1)]

This commit is contained in:
bnnm 2022-01-16 23:04:35 +01:00
parent 3146647934
commit 0f6ce99e2b
2 changed files with 7 additions and 5 deletions

View File

@ -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",

View File

@ -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;