adx: play even if key not found

For consistency with .hca and easier to identify by user
This commit is contained in:
bnnm 2021-09-19 23:54:06 +02:00
parent 5adae4db4c
commit cbaf17bfe0

View File

@ -34,14 +34,14 @@ VGMSTREAM* init_vgmstream_adx_subkey(STREAMFILE* sf, uint16_t subkey) {
/* checks*/
if (read_u16be(0x00,sf) != 0x8000)
goto fail;
/* .adx: standard
* .adp: Headhunter (DC) */
if (!check_extensions(sf,"adx,adp"))
goto fail;
if (read_u16be(0x00,sf) != 0x8000)
goto fail;
start_offset = read_u16be(0x02,sf) + 0x04;
if (read_u16be(start_offset - 0x06,sf) != 0x2863 || /* "(c" */
read_u32be(start_offset - 0x04,sf) != 0x29435249) /* ")CRI" */
@ -79,19 +79,20 @@ VGMSTREAM* init_vgmstream_adx_subkey(STREAMFILE* sf, uint16_t subkey) {
/* encryption */
if (version == 0x0408) {
if (find_adx_key(sf, 8, &xor_start, &xor_mult, &xor_add, 0)) {
vgm_logi("ADX: decryption keystring not found\n");
}
coding_type = coding_CRI_ADX_enc_8;
version = 0x0400;
}
vgm_asserti(version != 0x0400, "ADX: decryption keystring not found\n");
}
else if (version == 0x0409) {
if (find_adx_key(sf, 9, &xor_start, &xor_mult, &xor_add, subkey)) {
vgm_logi("ADX: decryption keycode not found\n");
}
coding_type = coding_CRI_ADX_enc_9;
version = 0x0400;
}
vgm_asserti(version != 0x0400, "ADX: decryption keycode not found\n");
}
/* version + extra data */
if (version == 0x0300) { /* early ADX (~1998) [Grandia (SAT), Baroque (SAT)] */