Add WiiVoice dsp [Fatal Frame 5 (WiiU)]

This commit is contained in:
bnnm 2020-11-09 20:40:24 +01:00
parent 807d479851
commit 847d93b7a1
5 changed files with 33 additions and 1 deletions

View File

@ -1314,6 +1314,7 @@ static const meta_info meta_info_list[] = {
{meta_SDRH, "feelplus SDRH header"},
{meta_WADY, "Marble WADY header"},
{meta_DSP_SQEX, "Square Enix DSP header"},
{meta_DSP_WIIVOICE, "Koei Tecmo WiiVoice header"},
};
void get_vgmstream_coding_description(VGMSTREAM* vgmstream, char* out, size_t out_size) {

View File

@ -54,7 +54,8 @@ VGMSTREAM* init_vgmstream_dsp_adpy(STREAMFILE* sf);
VGMSTREAM* init_vgmstream_dsp_adpx(STREAMFILE* sf);
VGMSTREAM* init_vgmstream_dsp_ds2(STREAMFILE* sf);
VGMSTREAM* init_vgmstream_dsp_itl(STREAMFILE* sf);
VGMSTREAM* init_vgmstream_dsp_sqex(STREAMFILE *sf);
VGMSTREAM* init_vgmstream_dsp_sqex(STREAMFILE* sf);
VGMSTREAM* init_vgmstream_dsp_wiivoice(STREAMFILE* sf);
VGMSTREAM * init_vgmstream_csmp(STREAMFILE *streamFile);

View File

@ -1278,3 +1278,31 @@ VGMSTREAM* init_vgmstream_dsp_sqex(STREAMFILE* sf) {
fail:
return NULL;
}
/* WiiVoice - Koei Tecmo wrapper [Fatal Frame 5 (WiiU)] */
VGMSTREAM* init_vgmstream_dsp_wiivoice(STREAMFILE* sf) {
dsp_meta dspm = {0};
/* also see g1l.c for WiiBGM weirder variation */
/* checks */
/* .dsp: assumed */
if (!check_extensions(sf, "dsp"))
goto fail;
if (read_u32be(0x00,sf) != 0x57696956 && /* "WiiV" */
read_u32be(0x04,sf) != 0x6F696365) /* "oice" */
goto fail;
dspm.channel_count = 1;
dspm.max_channels = 1;
dspm.header_offset = read_u32be(0x08,sf);
/* 0x10: file size */
/* 0x14: data size */
dspm.header_spacing = 0x60;
dspm.start_offset = dspm.header_offset + dspm.header_spacing*dspm.channel_count;
dspm.meta_type = meta_DSP_WIIVOICE;
return init_vgmstream_dsp_common(sf, &dspm);
fail:
return NULL;
}

View File

@ -508,6 +508,7 @@ VGMSTREAM* (*init_vgmstream_functions[])(STREAMFILE* sf) = {
init_vgmstream_xse_old,
init_vgmstream_wady,
init_vgmstream_dsp_sqex,
init_vgmstream_dsp_wiivoice,
/* lowest priority metas (should go after all metas, and TXTH should go before raw formats) */
init_vgmstream_txth, /* proper parsers should supersede TXTH, once added */

View File

@ -739,6 +739,7 @@ typedef enum {
meta_SDRH,
meta_WADY,
meta_DSP_SQEX,
meta_DSP_WIIVOICE,
} meta_t;
/* standard WAVEFORMATEXTENSIBLE speaker positions */