Remove stx parser since it's a repeat of afc

This commit is contained in:
bnnm 2019-11-02 16:15:18 +01:00
parent f6b4df6680
commit 42dad8d605
8 changed files with 4567 additions and 4650 deletions

View File

@ -834,7 +834,7 @@ static const meta_info meta_info_list[] = {
{meta_RFRM, "Retro Studios RFRM header"},
{meta_NGC_ADPDTK, "Nintendo ADP raw header"},
{meta_RSF, "Retro Studios RSF raw header"},
{meta_AFC, "Nintendo AFC header"},
{meta_AFC, "Nintendo .AFC header"},
{meta_AST, "Nintendo AST header"},
{meta_HALPST, "HAL Laboratory HALPST header"},
{meta_DSP_RS03, "Retro Studios RS03 header"},
@ -1026,7 +1026,6 @@ static const meta_info meta_info_list[] = {
{meta_WII_BNS, "Nintendo BNS header"},
{meta_WII_WAS, "Sumo Digital iSWS header"},
{meta_XBOX_HLWAV, "Half Life 2 bgm header"},
{meta_STX, "Nintendo .stx header"},
{meta_MYSPD, "U-Sing .MYSPD header"},
{meta_HIS, "Her Interactive HIS header"},
{meta_PS2_AST, "KOEI AST header"},

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -428,8 +428,6 @@ VGMSTREAM * init_vgmstream_pona_psx(STREAMFILE* streamFile);
VGMSTREAM * init_vgmstream_xbox_hlwav(STREAMFILE* streamFile);
VGMSTREAM * init_vgmstream_stx(STREAMFILE* streamFile);
VGMSTREAM * init_vgmstream_myspd(STREAMFILE* streamFile);
VGMSTREAM * init_vgmstream_his(STREAMFILE* streamFile);

View File

@ -1,70 +0,0 @@
#include "meta.h"
#include "../util.h"
VGMSTREAM * init_vgmstream_stx(STREAMFILE *streamFile) {
VGMSTREAM * vgmstream = NULL;
char filename[PATH_LIMIT];
const int loop_flag = 0;
const int channel_count = 2; /* .stx seems to be stereo only */
/* check extension, case insensitive */
streamFile->get_name(streamFile,filename,sizeof(filename));
if (strcasecmp("stx",filename_extension(filename))) goto fail;
/* length of data */
if (read_32bitBE(0x00,streamFile) !=
get_streamfile_size(streamFile) - 0x20) goto fail;
/* bits per sample? */
if (read_16bitBE(0x0a,streamFile) != 4) goto fail;
/* samples per frame? */
if (read_16bitBE(0x0c,streamFile) != 0x10) goto fail;
/* ?? */
if (read_16bitBE(0x0e,streamFile) != 0x1E) goto fail;
/* build the VGMSTREAM */
vgmstream = allocate_vgmstream(channel_count,loop_flag);
if (!vgmstream) goto fail;
/* fill in the vital statistics */
vgmstream->num_samples = read_32bitBE(0x04,streamFile);
vgmstream->sample_rate = (uint16_t)read_16bitBE(0x08,streamFile);
/* channels and loop flag are set by allocate_vgmstream */
vgmstream->coding_type = coding_NGC_AFC;
vgmstream->layout_type = layout_interleave;
vgmstream->meta_type = meta_STX;
/* frame-level interleave (9 bytes) */
vgmstream->interleave_block_size = 9;
/* open the file for reading by each channel */
{
STREAMFILE *chstreamfile;
int i;
/* both channels use same buffer, as interleave is so small */
chstreamfile = streamFile->open(streamFile,filename,STREAMFILE_DEFAULT_BUFFER_SIZE);
if (!chstreamfile) goto fail;
for (i=0;i<channel_count;i++) {
vgmstream->ch[i].streamfile = chstreamfile;
vgmstream->ch[i].channel_start_offset=
vgmstream->ch[i].offset=
0x20 + i*vgmstream->interleave_block_size;
}
}
return vgmstream;
/* clean up anything we may have opened */
fail:
if (vgmstream) close_vgmstream(vgmstream);
return NULL;
}

View File

@ -222,7 +222,6 @@ VGMSTREAM * (*init_vgmstream_functions[])(STREAMFILE *streamFile) = {
init_vgmstream_pona_3do,
init_vgmstream_pona_psx,
init_vgmstream_xbox_hlwav,
init_vgmstream_stx,
init_vgmstream_myspd,
init_vgmstream_his,
init_vgmstream_ps2_ast,

View File

@ -320,7 +320,6 @@ typedef enum {
meta_NDS_SWAV, /* Asphalt Urban GT 1 & 2 */
meta_NDS_RRDS, /* Ridge Racer DS */
meta_WII_BNS, /* Wii BNS Banner Sound (similar to RSTM) */
meta_STX, /* Pikmin .stx */
meta_WIIU_BTSND, /* Wii U Boot Sound */
meta_ADX_03, /* CRI ADX "type 03" */