mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-15 02:57:38 +01:00
Rename ps2_rxw to ps2_rxws and do some cleanup
This commit is contained in:
parent
8759d42928
commit
21c9f44273
@ -551,7 +551,7 @@ static const meta_info meta_info_list[] = {
|
||||
{meta_CWAV, "Nintendo CWAV header"},
|
||||
{meta_FWAV, "Nintendo FWAV header"},
|
||||
{meta_PSX_XA, "RIFF/CDXA header"},
|
||||
{meta_PS2_RXW, "RXWS header)"},
|
||||
{meta_PS2_RXWS, "Sony RXWS header)"},
|
||||
{meta_PS2_RAW, "assumed RAW Interleaved PCM by .int extension"},
|
||||
{meta_PS2_OMU, "Alter Echo OMU Header"},
|
||||
{meta_DSP_STM, "Nintendo STM header"},
|
||||
|
@ -835,7 +835,7 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\meta\ps2_rxw.c"
|
||||
RelativePath=".\meta\ps2_rxws.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
@ -315,7 +315,7 @@
|
||||
<ClCompile Include="meta\ps2_rnd.c" />
|
||||
<ClCompile Include="meta\ps2_rstm.c" />
|
||||
<ClCompile Include="meta\ps2_rws.c" />
|
||||
<ClCompile Include="meta\ps2_rxw.c" />
|
||||
<ClCompile Include="meta\ps2_rxws.c" />
|
||||
<ClCompile Include="meta\ps2_sfs.c" />
|
||||
<ClCompile Include="meta\ps2_sl3.c" />
|
||||
<ClCompile Include="meta\ps2_smpl.c" />
|
||||
|
@ -496,7 +496,7 @@
|
||||
<ClCompile Include="meta\ps2_rws.c">
|
||||
<Filter>meta\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="meta\ps2_rxw.c">
|
||||
<ClCompile Include="meta\ps2_rxws.c">
|
||||
<Filter>meta\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="meta\ps2_sfs.c">
|
||||
|
@ -197,13 +197,9 @@ VGMSTREAM * init_vgmstream_xa30(STREAMFILE * streamFile);
|
||||
VGMSTREAM * init_vgmstream_musc(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_musx_v004(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_musx_v005(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_musx_v006(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_musx_v010(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_musx_v201(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_leg(STREAMFILE * streamFile);
|
||||
@ -315,28 +311,22 @@ VGMSTREAM * init_vgmstream_ngc_pdt(STREAMFILE * streamFile);
|
||||
VGMSTREAM * init_vgmstream_wii_mus(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_rsd2vag(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_rsd2pcmb(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_rsd2xadp(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_rsd3pcm(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_rsd3pcmb(STREAMFILE * streamFile);
|
||||
VGMSTREAM * init_vgmstream_rsd3gadp(STREAMFILE * streamFile);
|
||||
VGMSTREAM * init_vgmstream_rsd3vag(STREAMFILE * streamFile);
|
||||
VGMSTREAM * init_vgmstream_rsd4pcmb(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_rsd4pcm(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_rsd4radp(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_rsd4vag(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_rsd6vag(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_rsd6wadp(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_rsd6xadp(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_rsd6radp(STREAMFILE * streamFile);
|
||||
VGMSTREAM * init_vgmstream_rsd6oogv(STREAMFILE* streamFile);
|
||||
VGMSTREAM * init_vgmstream_rsd6xma(STREAMFILE *streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_dc_asd(STREAMFILE * streamFile);
|
||||
|
||||
@ -436,18 +426,12 @@ VGMSTREAM * init_vgmstream_ps2_xa2_rrp(STREAMFILE *streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_nds_hwas(STREAMFILE *streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_rsd3vag(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_ngc_lps(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_ps2_snd(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_naomi_adpcm(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_rsd3pcmb(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_rsd3gadp(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_sd9(STREAMFILE * streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_2dx9(STREAMFILE * streamFile);
|
||||
@ -633,8 +617,6 @@ VGMSTREAM * init_vgmstream_ps3_ivag(STREAMFILE* streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_ps2_2pfs(STREAMFILE* streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_rsd6oogv(STREAMFILE* streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_ubi_ckd(STREAMFILE* streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_ps2_vbk(STREAMFILE* streamFile);
|
||||
@ -669,7 +651,6 @@ VGMSTREAM * init_vgmstream_x360_cxs(STREAMFILE* streamFile);
|
||||
VGMSTREAM * init_vgmstream_dsp_adx(STREAMFILE *streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_akb_multi(STREAMFILE *streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_akb2_multi(STREAMFILE *streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_x360_ast(STREAMFILE *streamFile);
|
||||
@ -690,10 +671,7 @@ VGMSTREAM * init_vgmstream_mc3(STREAMFILE *streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_gtd(STREAMFILE *streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_rsd6xma(STREAMFILE *streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_ta_aac_x360(STREAMFILE *streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_ta_aac_ps3(STREAMFILE *streamFile);
|
||||
|
||||
#endif /*_META_H*/
|
||||
|
@ -1,70 +0,0 @@
|
||||
#include "meta.h"
|
||||
#include "../util.h"
|
||||
|
||||
/* RXW file (Arc the Lad) */
|
||||
VGMSTREAM * init_vgmstream_ps2_rxw(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
char filename[PATH_LIMIT];
|
||||
int loop_flag=0;
|
||||
int channel_count;
|
||||
off_t start_offset;
|
||||
int i;
|
||||
|
||||
/* check extension, case insensitive */
|
||||
streamFile->get_name(streamFile,filename,sizeof(filename));
|
||||
if (strcasecmp("rxw",filename_extension(filename))) goto fail;
|
||||
|
||||
/* check RXWS/FORM Header */
|
||||
if (!((read_32bitBE(0x00,streamFile) == 0x52585753) &&
|
||||
(read_32bitBE(0x10,streamFile) == 0x464F524D)))
|
||||
goto fail;
|
||||
|
||||
/* check loop */
|
||||
loop_flag = (read_32bitLE(0x3C,streamFile)!=0xFFFFFFFF);
|
||||
|
||||
/* Always stereo files */
|
||||
channel_count=2;
|
||||
|
||||
/* 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_32bitLE(0x2E,streamFile);
|
||||
|
||||
vgmstream->coding_type = coding_PSX;
|
||||
vgmstream->num_samples = (read_32bitLE(0x38,streamFile)*28/16)/2;
|
||||
|
||||
/* Get loop point values */
|
||||
if(vgmstream->loop_flag) {
|
||||
vgmstream->loop_start_sample = read_32bitLE(0x3C,streamFile)/16*14;
|
||||
vgmstream->loop_end_sample = read_32bitLE(0x38,streamFile)/16*14;
|
||||
}
|
||||
|
||||
vgmstream->interleave_block_size = read_32bitLE(0x1c,streamFile)+0x10;
|
||||
vgmstream->layout_type = layout_interleave;
|
||||
vgmstream->meta_type = meta_PS2_RXW;
|
||||
|
||||
start_offset = 0x40;
|
||||
|
||||
/* open the file for reading by each channel */
|
||||
{
|
||||
for (i=0;i<channel_count;i++) {
|
||||
vgmstream->ch[i].streamfile = streamFile->open(streamFile,filename,0x8000);
|
||||
|
||||
if (!vgmstream->ch[i].streamfile) goto fail;
|
||||
|
||||
vgmstream->ch[i].channel_start_offset=
|
||||
vgmstream->ch[i].offset=
|
||||
(off_t)(start_offset+vgmstream->interleave_block_size*i);
|
||||
}
|
||||
}
|
||||
|
||||
return vgmstream;
|
||||
|
||||
/* clean up anything we may have opened */
|
||||
fail:
|
||||
if (vgmstream) close_vgmstream(vgmstream);
|
||||
return NULL;
|
||||
}
|
49
src/meta/ps2_rxws.c
Normal file
49
src/meta/ps2_rxws.c
Normal file
@ -0,0 +1,49 @@
|
||||
#include "meta.h"
|
||||
#include "../util.h"
|
||||
|
||||
/* .RXW - presumably fake header for split files with joint XWH+XWB (has incorrect chunk sizes) */
|
||||
VGMSTREAM * init_vgmstream_ps2_rxw(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
int loop_flag=0, channel_count;
|
||||
off_t start_offset;
|
||||
|
||||
/* check extension, case insensitive */
|
||||
if (!check_extensions(streamFile,"rxw")) goto fail;
|
||||
|
||||
/* check RXWS/FORM Header */
|
||||
if (!((read_32bitBE(0x00,streamFile) == 0x52585753) &&
|
||||
(read_32bitBE(0x10,streamFile) == 0x464F524D)))
|
||||
goto fail;
|
||||
|
||||
loop_flag = (read_32bitLE(0x3C,streamFile)!=0xFFFFFFFF);
|
||||
channel_count=2; /* Always stereo files */
|
||||
|
||||
/* build the VGMSTREAM */
|
||||
vgmstream = allocate_vgmstream(channel_count,loop_flag);
|
||||
if (!vgmstream) goto fail;
|
||||
|
||||
vgmstream->sample_rate = read_32bitLE(0x2E,streamFile);
|
||||
vgmstream->num_samples = (read_32bitLE(0x38,streamFile)*28/16)/2;
|
||||
|
||||
/* Get loop point values */
|
||||
if(vgmstream->loop_flag) {
|
||||
vgmstream->loop_start_sample = read_32bitLE(0x3C,streamFile)/16*14;
|
||||
vgmstream->loop_end_sample = read_32bitLE(0x38,streamFile)/16*14;
|
||||
}
|
||||
|
||||
vgmstream->interleave_block_size = read_32bitLE(0x1c,streamFile)+0x10;
|
||||
vgmstream->coding_type = coding_PSX;
|
||||
vgmstream->layout_type = layout_interleave;
|
||||
vgmstream->meta_type = meta_PS2_RXWS;
|
||||
start_offset = 0x40;
|
||||
|
||||
/* open the file for reading */
|
||||
if (!vgmstream_open_stream(vgmstream,streamFile,start_offset))
|
||||
goto fail;
|
||||
|
||||
return vgmstream;
|
||||
|
||||
fail:
|
||||
close_vgmstream(vgmstream);
|
||||
return NULL;
|
||||
}
|
@ -311,7 +311,7 @@ typedef enum {
|
||||
meta_PSX_XA, /* CD-ROM XA with RIFF header */
|
||||
meta_PS2_SShd, /* .ADS with SShd header */
|
||||
meta_PS2_NPSF, /* Namco Production Sound File */
|
||||
meta_PS2_RXW, /* Sony Arc The Lad Sound File */
|
||||
meta_PS2_RXWS, /* Sony games (Genji, Okage Shadow King, Arc The Lad Twilight of Spirits) */
|
||||
meta_PS2_RAW, /* RAW Interleaved Format */
|
||||
meta_PS2_EXST, /* Shadow of Colossus EXST */
|
||||
meta_PS2_SVAG, /* Konami SVAG */
|
||||
|
Loading…
Reference in New Issue
Block a user