mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-18 15:54:05 +01:00
cleanup: remove unused bdsp
apparently an attempt to support extracted .hst/hxg files from PK: Out of Shadows
This commit is contained in:
parent
c8479a1501
commit
bb7176463b
@ -100,7 +100,6 @@ static const char* extension_list[] = {
|
||||
"bcwav",
|
||||
"bcv", //txth/reserved [The Bigs (PSP)]
|
||||
"bd3",
|
||||
"bdsp",
|
||||
"bfstm",
|
||||
"bfwav",
|
||||
"bg00",
|
||||
@ -942,7 +941,6 @@ static const layout_info layout_info_list[] = {
|
||||
{layout_blocked_filp, "blocked (FILP)"},
|
||||
{layout_blocked_ea_swvr, "blocked (EA SWVR)"},
|
||||
{layout_blocked_adm, "blocked (ADM)"},
|
||||
{layout_blocked_bdsp, "blocked (BDSP)"},
|
||||
{layout_blocked_ivaud, "blocked (IVAUD)"},
|
||||
{layout_blocked_ps2_iab, "blocked (IAB)"},
|
||||
{layout_blocked_vs_str, "blocked (STR VS)"},
|
||||
|
@ -156,9 +156,6 @@ void block_update(off_t block_offset, VGMSTREAM* vgmstream) {
|
||||
case layout_blocked_adm:
|
||||
block_update_adm(block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_bdsp:
|
||||
block_update_bdsp(block_offset,vgmstream);
|
||||
break;
|
||||
case layout_blocked_ps2_iab:
|
||||
block_update_ps2_iab(block_offset,vgmstream);
|
||||
break;
|
||||
|
@ -1,18 +0,0 @@
|
||||
#include "layout.h"
|
||||
#include "../vgmstream.h"
|
||||
|
||||
/* set up for the block at the given offset */
|
||||
void block_update_bdsp(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
int i;
|
||||
|
||||
vgmstream->current_block_offset = block_offset;
|
||||
vgmstream->current_block_size = read_32bitBE(vgmstream->current_block_offset,vgmstream->ch[0].streamfile)/7*8;
|
||||
vgmstream->next_block_offset = vgmstream->current_block_offset + vgmstream->current_block_size+0xC0;
|
||||
|
||||
for (i=0;i<vgmstream->channels;i++) {
|
||||
|
||||
vgmstream->ch[i].channel_start_offset=
|
||||
vgmstream->ch[i].offset=vgmstream->current_block_offset*i;
|
||||
|
||||
}
|
||||
}
|
@ -31,7 +31,6 @@ void block_update_filp(off_t block_offset, VGMSTREAM* vgmstream);
|
||||
void block_update_ivaud(off_t block_offset, VGMSTREAM* vgmstream);
|
||||
void block_update_ea_swvr(off_t block_offset, VGMSTREAM* vgmstream);
|
||||
void block_update_adm(off_t block_offset, VGMSTREAM* vgmstream);
|
||||
void block_update_bdsp(off_t block_offset, VGMSTREAM* vgmstream);
|
||||
void block_update_ps2_iab(off_t block_offset, VGMSTREAM* vgmstream);
|
||||
void block_update_vs_str(off_t block_offset, VGMSTREAM* vgmstream);
|
||||
void block_update_rws(off_t block_offset, VGMSTREAM* vgmstream);
|
||||
|
@ -283,7 +283,6 @@
|
||||
<ClCompile Include="layout\blocked_adm.c" />
|
||||
<ClCompile Include="layout\blocked_ast.c" />
|
||||
<ClCompile Include="layout\blocked_awc.c" />
|
||||
<ClCompile Include="layout\blocked_bdsp.c" />
|
||||
<ClCompile Include="layout\blocked_caf.c" />
|
||||
<ClCompile Include="layout\blocked_dec.c" />
|
||||
<ClCompile Include="layout\blocked_ea_1snh.c" />
|
||||
@ -404,7 +403,6 @@
|
||||
<ClCompile Include="meta\dmsg_segh.c" />
|
||||
<ClCompile Include="meta\dsb.c" />
|
||||
<ClCompile Include="meta\dsf.c" />
|
||||
<ClCompile Include="meta\dsp_bdsp.c" />
|
||||
<ClCompile Include="meta\ea_1snh.c" />
|
||||
<ClCompile Include="meta\ea_eaac.c" />
|
||||
<ClCompile Include="meta\ea_schl.c" />
|
||||
|
@ -670,9 +670,6 @@
|
||||
<ClCompile Include="layout\blocked_awc.c">
|
||||
<Filter>layout\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="layout\blocked_bdsp.c">
|
||||
<Filter>layout\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="layout\blocked_caf.c">
|
||||
<Filter>layout\Source Files</Filter>
|
||||
</ClCompile>
|
||||
@ -1033,9 +1030,6 @@
|
||||
<ClCompile Include="meta\dsf.c">
|
||||
<Filter>meta\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="meta\dsp_bdsp.c">
|
||||
<Filter>meta\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="meta\ea_1snh.c">
|
||||
<Filter>meta\Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -1,87 +0,0 @@
|
||||
#include "meta.h"
|
||||
#include "../layout/layout.h"
|
||||
#include "../util.h"
|
||||
|
||||
VGMSTREAM * init_vgmstream_dsp_bdsp(STREAMFILE *streamFile) {
|
||||
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
char filename[PATH_LIMIT];
|
||||
int channel_count;
|
||||
int loop_flag;
|
||||
int i;
|
||||
off_t start_offset;
|
||||
|
||||
/* check extension, case insensitive */
|
||||
streamFile->get_name(streamFile,filename,sizeof(filename));
|
||||
if (strcasecmp("bdsp",filename_extension(filename))) goto fail;
|
||||
|
||||
channel_count = 2;
|
||||
loop_flag = 0;
|
||||
|
||||
/* build the VGMSTREAM */
|
||||
vgmstream = allocate_vgmstream(channel_count,loop_flag);
|
||||
if (!vgmstream) goto fail;
|
||||
|
||||
/* fill in the vital statistics */
|
||||
vgmstream->channels = channel_count;
|
||||
vgmstream->sample_rate = read_32bitBE(0x8,streamFile);
|
||||
vgmstream->coding_type = coding_NGC_DSP;
|
||||
|
||||
#if 0
|
||||
if(loop_flag) {
|
||||
vgmstream->loop_start_sample = read_32bitBE(0x64,streamFile);
|
||||
vgmstream->loop_end_sample = read_32bitBE(0x68,streamFile);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
vgmstream->layout_type = layout_blocked_bdsp;
|
||||
vgmstream->interleave_block_size = 0x8;
|
||||
vgmstream->meta_type = meta_DSP_BDSP;
|
||||
|
||||
/* open the file for reading by each channel */
|
||||
{
|
||||
for (i=0;i<channel_count;i++) {
|
||||
vgmstream->ch[i].streamfile = streamFile->open(streamFile,filename,STREAMFILE_DEFAULT_BUFFER_SIZE);
|
||||
|
||||
if (!vgmstream->ch[i].streamfile) goto fail;
|
||||
vgmstream->ch[i].channel_start_offset=
|
||||
vgmstream->ch[i].offset=i*vgmstream->interleave_block_size;
|
||||
}
|
||||
}
|
||||
|
||||
if (vgmstream->coding_type == coding_NGC_DSP) {
|
||||
int i;
|
||||
for (i=0;i<16;i++) {
|
||||
vgmstream->ch[0].adpcm_coef[i] = read_16bitBE(0x1C+i*2,streamFile);
|
||||
}
|
||||
if (vgmstream->channels == 2) {
|
||||
for (i=0;i<16;i++) {
|
||||
vgmstream->ch[1].adpcm_coef[i] = read_16bitBE(0x7C+i*2,streamFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Calc num_samples */
|
||||
start_offset = 0x0;
|
||||
block_update_bdsp(start_offset,vgmstream);
|
||||
vgmstream->num_samples=0;
|
||||
|
||||
do
|
||||
{
|
||||
vgmstream->num_samples += vgmstream->current_block_size*14/8;
|
||||
block_update_bdsp(vgmstream->next_block_offset,vgmstream);
|
||||
}
|
||||
while (vgmstream->next_block_offset<get_streamfile_size(streamFile));
|
||||
|
||||
block_update_bdsp(start_offset,vgmstream);
|
||||
|
||||
|
||||
return vgmstream;
|
||||
|
||||
|
||||
/* clean up anything we may have opened */
|
||||
fail:
|
||||
if (vgmstream) close_vgmstream(vgmstream);
|
||||
return NULL;
|
||||
}
|
@ -468,8 +468,6 @@ VGMSTREAM * init_vgmstream_ps2_adm(STREAMFILE* streamFile);
|
||||
|
||||
VGMSTREAM* init_vgmstream_lpcm_shade(STREAMFILE* sf);
|
||||
|
||||
VGMSTREAM * init_vgmstream_dsp_bdsp(STREAMFILE* streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_ps2_vms(STREAMFILE* streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_xau(STREAMFILE* streamFile);
|
||||
|
@ -220,7 +220,6 @@ init_vgmstream_t init_vgmstream_functions[] = {
|
||||
init_vgmstream_dsp_xiii,
|
||||
init_vgmstream_dsp_cabelas,
|
||||
init_vgmstream_lpcm_shade,
|
||||
init_vgmstream_dsp_bdsp,
|
||||
init_vgmstream_ps2_vms,
|
||||
init_vgmstream_xau,
|
||||
init_vgmstream_bar,
|
||||
|
@ -212,7 +212,6 @@ typedef enum {
|
||||
layout_blocked_filp,
|
||||
layout_blocked_ea_swvr,
|
||||
layout_blocked_adm,
|
||||
layout_blocked_bdsp,
|
||||
layout_blocked_mxch,
|
||||
layout_blocked_ivaud, /* GTA IV .ivaud blocks */
|
||||
layout_blocked_ps2_iab,
|
||||
@ -478,7 +477,6 @@ typedef enum {
|
||||
meta_DSP_CABELAS, /* Cabelas games */
|
||||
meta_PS2_ADM, /* Dragon Quest V (PS2) */
|
||||
meta_LPCM_SHADE,
|
||||
meta_DSP_BDSP, /* Ah! My Goddess */
|
||||
meta_PS2_VMS, /* Autobahn Raser - Police Madness */
|
||||
meta_XAU, /* XPEC Entertainment (Beat Down (PS2 Xbox), Spectral Force Chronicle (PS2)) */
|
||||
meta_GH3_BAR, /* Guitar Hero III Mobile .bar */
|
||||
|
Loading…
x
Reference in New Issue
Block a user