Remove fake extension .bh2pcm (use .dat + TXTH)

This commit is contained in:
bnnm 2023-07-01 00:47:55 +02:00
parent 6024d32a6e
commit fc6efd7afa
7 changed files with 0 additions and 96 deletions

View File

@ -104,7 +104,6 @@ static const char* extension_list[] = {
"bg00",
"bgm",
"bgw",
"bh2pcm",
"bigrp",
"bik",
"bika", //fake extension for .bik (to be removed)

View File

@ -508,7 +508,6 @@
<ClCompile Include="meta\nds_strm.c" />
<ClCompile Include="meta\nds_strm_ffta2.c" />
<ClCompile Include="meta\ngc_adpdtk.c" />
<ClCompile Include="meta\ngc_bh2pcm.c" />
<ClCompile Include="meta\ngc_dsp_konami.c" />
<ClCompile Include="meta\ngc_dsp_mpds.c" />
<ClCompile Include="meta\ngc_dsp_std.c" />

View File

@ -1345,9 +1345,6 @@
<ClCompile Include="meta\ngc_adpdtk.c">
<Filter>meta\Source Files</Filter>
</ClCompile>
<ClCompile Include="meta\ngc_bh2pcm.c">
<Filter>meta\Source Files</Filter>
</ClCompile>
<ClCompile Include="meta\ngc_dsp_konami.c">
<Filter>meta\Source Files</Filter>
</ClCompile>

View File

@ -275,8 +275,6 @@ VGMSTREAM * init_vgmstream_xmu(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_xvas(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_ngc_bh2pcm(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_sat_sap(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_dc_idvi(STREAMFILE *streamFile);

View File

@ -1,87 +0,0 @@
#include "meta.h"
#include "../util.h"
/* BH2PCM (from Bio Hazard 2) */
VGMSTREAM * init_vgmstream_ngc_bh2pcm(STREAMFILE *streamFile) {
VGMSTREAM * vgmstream = NULL;
char filename[PATH_LIMIT];
off_t start_offset;
int channel_count;
int format_detect;
int loop_flag;
/* check extension, case insensitive */
streamFile->get_name(streamFile,filename,sizeof(filename));
if (strcasecmp("bh2pcm",filename_extension(filename))) goto fail;
#if 0
/* check header */
if (read_32bitBE(0x00,streamFile) != 0x00000000)
goto fail;
#endif
loop_flag = 0;
channel_count = 2;
/* build the VGMSTREAM */
vgmstream = allocate_vgmstream(channel_count,loop_flag);
if (!vgmstream) goto fail;
/* fill in the vital statistics */
format_detect=read_32bitLE(0x00,streamFile);
switch (format_detect) {
case 1:
start_offset = 0x20;
channel_count = 2;
vgmstream->channels = channel_count;
vgmstream->sample_rate = 32000;
vgmstream->num_samples = read_32bitLE(0x04,streamFile)/2;
vgmstream->layout_type = layout_interleave;
vgmstream->interleave_block_size = read_32bitLE(0x04,streamFile);
if (loop_flag) {
vgmstream->loop_start_sample = 0;
vgmstream->loop_end_sample = read_32bitLE(0x14,streamFile);
}
break;
case 0:
start_offset = 0x20;
channel_count = 1;
vgmstream->channels = channel_count;
vgmstream->sample_rate = 32000;
vgmstream->num_samples = read_32bitLE(0x0C,streamFile);
vgmstream->layout_type = layout_none;
if (loop_flag) {
vgmstream->loop_start_sample = read_32bitLE(0x08,streamFile);
vgmstream->loop_end_sample = read_32bitLE(0x0C,streamFile);
}
break;
default:
goto fail;
}
vgmstream->coding_type = coding_PCM16BE;
vgmstream->meta_type = meta_NGC_BH2PCM;
/* open the file for reading */
{
int i;
STREAMFILE * file;
file = streamFile->open(streamFile,filename,STREAMFILE_DEFAULT_BUFFER_SIZE);
if (!file) goto fail;
for (i=0;i<channel_count;i++) {
vgmstream->ch[i].streamfile = file;
vgmstream->ch[i].channel_start_offset=
vgmstream->ch[i].offset=start_offset+
vgmstream->interleave_block_size*i;
}
}
return vgmstream;
/* clean up anything we may have opened */
fail:
if (vgmstream) close_vgmstream(vgmstream);
return NULL;
}

View File

@ -115,7 +115,6 @@ init_vgmstream_t init_vgmstream_functions[] = {
init_vgmstream_dc_str_v2,
init_vgmstream_xmu,
init_vgmstream_xvas,
init_vgmstream_ngc_bh2pcm,
init_vgmstream_sat_sap,
init_vgmstream_dc_idvi,
init_vgmstream_ps2_rnd,

View File

@ -348,7 +348,6 @@ typedef enum {
meta_NGC_TYDSP, /* Ty - The Tasmanian Tiger */
meta_DC_STR, /* SEGA Stream Asset Builder */
meta_DC_STR_V2, /* variant of SEGA Stream Asset Builder */
meta_NGC_BH2PCM, /* Bio Hazard 2 */
meta_SAP,
meta_DC_IDVI, /* Eldorado Gate */
meta_KRAW, /* Geometry Wars - Galaxies */