Meta cleanup and renames

This commit is contained in:
bnnm 2019-09-02 22:32:02 +02:00
parent 087e22dad2
commit 0a4921e2ef
15 changed files with 145 additions and 193 deletions

View File

@ -807,7 +807,7 @@ static const meta_info meta_info_list[] = {
{meta_FWAV, "Nintendo FWAV header"}, {meta_FWAV, "Nintendo FWAV header"},
{meta_XA, "Sony XA header"}, {meta_XA, "Sony XA header"},
{meta_PS2_RXWS, "Sony RXWS header"}, {meta_PS2_RXWS, "Sony RXWS header"},
{meta_PS2_RAW, ".int PCM raw header"}, {meta_RAW_INT, "PS2 .int raw header"},
{meta_PS2_OMU, "Alter Echo OMU Header"}, {meta_PS2_OMU, "Alter Echo OMU Header"},
{meta_DSP_STM, "Intelligent Systems STM header"}, {meta_DSP_STM, "Intelligent Systems STM header"},
{meta_PS2_EXST, "Sony EXST header"}, {meta_PS2_EXST, "Sony EXST header"},
@ -821,7 +821,7 @@ static const meta_info meta_info_list[] = {
{meta_DSP_GCM, "Double DSP header stereo by .gcm extension"}, {meta_DSP_GCM, "Double DSP header stereo by .gcm extension"},
{meta_IDSP_TT, "Traveller's Tales IDSP header"}, {meta_IDSP_TT, "Traveller's Tales IDSP header"},
{meta_RSTM_SPM, "Nintendo RSTM header (brstmspm)"}, {meta_RSTM_SPM, "Nintendo RSTM header (brstmspm)"},
{meta_RAW, "assumed RAW PCM file by .raw extension"}, {meta_RAW_PCM, "PC .raw raw header"},
{meta_PS2_VAGi, "Sony VAGi header"}, {meta_PS2_VAGi, "Sony VAGi header"},
{meta_PS2_VAGp, "Sony VAGp header"}, {meta_PS2_VAGp, "Sony VAGp header"},
{meta_PS2_pGAV, "Sony pGAV header"}, {meta_PS2_pGAV, "Sony pGAV header"},
@ -829,7 +829,7 @@ static const meta_info meta_info_list[] = {
{meta_STR_WAV, "Blitz Games .STR+WAV header"}, {meta_STR_WAV, "Blitz Games .STR+WAV header"},
{meta_PS2_ILD, "ILD header"}, {meta_PS2_ILD, "ILD header"},
{meta_PS2_PNB, "assumed PNB (PsychoNauts Bgm File) by .pnb extension"}, {meta_PS2_PNB, "assumed PNB (PsychoNauts Bgm File) by .pnb extension"},
{meta_XBOX_WAVM, "Xbox WAVM raw header"}, {meta_RAW_WAVM, "Xbox .wavm raw header"},
{meta_DSP_STR, "assumed Conan Gamecube STR File by .str extension"}, {meta_DSP_STR, "assumed Conan Gamecube STR File by .str extension"},
{meta_EA_SCHL, "Electronic Arts SCHl header (variable)"}, {meta_EA_SCHL, "Electronic Arts SCHl header (variable)"},
{meta_EA_SCHL_fixed, "Electronic Arts SCHl header (fixed)"}, {meta_EA_SCHL_fixed, "Electronic Arts SCHl header (fixed)"},
@ -903,8 +903,8 @@ static const meta_info meta_info_list[] = {
{meta_VS, "Melbourne House .VS header"}, {meta_VS, "Melbourne House .VS header"},
{meta_DC_STR, "Sega Stream Asset Builder header"}, {meta_DC_STR, "Sega Stream Asset Builder header"},
{meta_DC_STR_V2, "variant of Sega Stream Asset Builder header"}, {meta_DC_STR_V2, "variant of Sega Stream Asset Builder header"},
{meta_XBOX_XMU, "XMU header"}, {meta_XMU, "Outrage XMU header"},
{meta_XBOX_XVAS, "Konami .XVAS header"}, {meta_XVAS, "Konami .XVAS header"},
{meta_PS2_XA2, "Acclaim XA2 Header"}, {meta_PS2_XA2, "Acclaim XA2 Header"},
{meta_DC_IDVI, "Capcom IDVI header"}, {meta_DC_IDVI, "Capcom IDVI header"},
{meta_KRAW, "Geometry Wars: Galaxies KRAW header"}, {meta_KRAW, "Geometry Wars: Galaxies KRAW header"},
@ -1036,7 +1036,7 @@ static const meta_info meta_info_list[] = {
{meta_VS_STR, "Square .VS STR* header"}, {meta_VS_STR, "Square .VS STR* header"},
{meta_LSF_N1NJ4N, ".lsf !n1nj4n header"}, {meta_LSF_N1NJ4N, ".lsf !n1nj4n header"},
{meta_VAWX, "feelplus VAWX header"}, {meta_VAWX, "feelplus VAWX header"},
{meta_PC_SNDS, "assumed Heavy Iron IMA by .snds extension"}, {meta_RAW_SNDS, "PC .snds raw header"},
{meta_PS2_WMUS, "assumed The Warriors Sony ADPCM by .wmus extension"}, {meta_PS2_WMUS, "assumed The Warriors Sony ADPCM by .wmus extension"},
{meta_HYPERSCAN_KVAG, "Mattel Hyperscan KVAG"}, {meta_HYPERSCAN_KVAG, "Mattel Hyperscan KVAG"},
{meta_IOS_PSND, "PSND Header"}, {meta_IOS_PSND, "PSND Header"},

View File

@ -1019,7 +1019,7 @@
> >
</File> </File>
<File <File
RelativePath=".\meta\pc_snds.c" RelativePath=".\meta\raw_snds.c"
> >
</File> </File>
<File <File
@ -1139,7 +1139,7 @@
> >
</File> </File>
<File <File
RelativePath=".\meta\ps2_int.c" RelativePath=".\meta\raw_int.c"
> >
</File> </File>
<File <File
@ -1403,7 +1403,7 @@
> >
</File> </File>
<File <File
RelativePath=".\meta\raw.c" RelativePath=".\meta\raw_pcm.c"
> >
</File> </File>
<File <File
@ -1731,15 +1731,15 @@
> >
</File> </File>
<File <File
RelativePath=".\meta\xbox_wavm.c" RelativePath=".\meta\raw_wavm.c"
> >
</File> </File>
<File <File
RelativePath=".\meta\xbox_xmu.c" RelativePath=".\meta\xmu.c"
> >
</File> </File>
<File <File
RelativePath=".\meta\xbox_xvas.c" RelativePath=".\meta\xvas.c"
> >
</File> </File>
<File <File

View File

@ -185,7 +185,7 @@
<ClCompile Include="meta\pc_adp.c" /> <ClCompile Include="meta\pc_adp.c" />
<ClCompile Include="meta\pc_adp_otns.c" /> <ClCompile Include="meta\pc_adp_otns.c" />
<ClCompile Include="meta\pc_ast.c" /> <ClCompile Include="meta\pc_ast.c" />
<ClCompile Include="meta\pc_snds.c" /> <ClCompile Include="meta\raw_snds.c" />
<ClCompile Include="meta\ps2_2pfs.c" /> <ClCompile Include="meta\ps2_2pfs.c" />
<ClCompile Include="meta\ps2_hsf.c" /> <ClCompile Include="meta\ps2_hsf.c" />
<ClCompile Include="meta\ps2_iab.c" /> <ClCompile Include="meta\ps2_iab.c" />
@ -392,7 +392,7 @@
<ClCompile Include="meta\ps2_hgc1.c" /> <ClCompile Include="meta\ps2_hgc1.c" />
<ClCompile Include="meta\ikm.c" /> <ClCompile Include="meta\ikm.c" />
<ClCompile Include="meta\ps2_ild.c" /> <ClCompile Include="meta\ps2_ild.c" />
<ClCompile Include="meta\ps2_int.c" /> <ClCompile Include="meta\raw_int.c" />
<ClCompile Include="meta\ps2_joe.c" /> <ClCompile Include="meta\ps2_joe.c" />
<ClCompile Include="meta\jstm.c" /> <ClCompile Include="meta\jstm.c" />
<ClCompile Include="meta\ps2_kces.c" /> <ClCompile Include="meta\ps2_kces.c" />
@ -443,7 +443,7 @@
<ClCompile Include="meta\ffdl.c" /> <ClCompile Include="meta\ffdl.c" />
<ClCompile Include="meta\seb.c" /> <ClCompile Include="meta\seb.c" />
<ClCompile Include="meta\ea_swvr.c" /> <ClCompile Include="meta\ea_swvr.c" />
<ClCompile Include="meta\raw.c" /> <ClCompile Include="meta\raw_pcm.c" />
<ClCompile Include="meta\redspark.c" /> <ClCompile Include="meta\redspark.c" />
<ClCompile Include="meta\rfrm.c" /> <ClCompile Include="meta\rfrm.c" />
<ClCompile Include="meta\riff.c" /> <ClCompile Include="meta\riff.c" />
@ -509,9 +509,9 @@
<ClCompile Include="meta\xavs.c" /> <ClCompile Include="meta\xavs.c" />
<ClCompile Include="meta\xbox_hlwav.c" /> <ClCompile Include="meta\xbox_hlwav.c" />
<ClCompile Include="meta\xbox_ims.c" /> <ClCompile Include="meta\xbox_ims.c" />
<ClCompile Include="meta\xbox_wavm.c" /> <ClCompile Include="meta\raw_wavm.c" />
<ClCompile Include="meta\xbox_xmu.c" /> <ClCompile Include="meta\xmu.c" />
<ClCompile Include="meta\xbox_xvas.c" /> <ClCompile Include="meta\xvas.c" />
<ClCompile Include="meta\x360_pasx.c" /> <ClCompile Include="meta\x360_pasx.c" />
<ClCompile Include="meta\xma.c" /> <ClCompile Include="meta\xma.c" />
<ClCompile Include="meta\xnb.c" /> <ClCompile Include="meta\xnb.c" />

View File

@ -712,7 +712,7 @@
<ClCompile Include="meta\ps2_ild.c"> <ClCompile Include="meta\ps2_ild.c">
<Filter>meta\Source Files</Filter> <Filter>meta\Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="meta\ps2_int.c"> <ClCompile Include="meta\raw_int.c">
<Filter>meta\Source Files</Filter> <Filter>meta\Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="meta\ps2_joe.c"> <ClCompile Include="meta\ps2_joe.c">
@ -865,7 +865,7 @@
<ClCompile Include="meta\ea_swvr.c"> <ClCompile Include="meta\ea_swvr.c">
<Filter>meta\Source Files</Filter> <Filter>meta\Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="meta\raw.c"> <ClCompile Include="meta\raw_pcm.c">
<Filter>meta\Source Files</Filter> <Filter>meta\Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="meta\redspark.c"> <ClCompile Include="meta\redspark.c">
@ -1066,13 +1066,13 @@
<ClCompile Include="meta\xbox_ims.c"> <ClCompile Include="meta\xbox_ims.c">
<Filter>meta\Source Files</Filter> <Filter>meta\Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="meta\xbox_wavm.c"> <ClCompile Include="meta\raw_wavm.c">
<Filter>meta\Source Files</Filter> <Filter>meta\Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="meta\xbox_xmu.c"> <ClCompile Include="meta\xmu.c">
<Filter>meta\Source Files</Filter> <Filter>meta\Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="meta\xbox_xvas.c"> <ClCompile Include="meta\xvas.c">
<Filter>meta\Source Files</Filter> <Filter>meta\Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="meta\xss.c"> <ClCompile Include="meta\xss.c">
@ -1420,7 +1420,7 @@
<ClCompile Include="meta\vawx.c"> <ClCompile Include="meta\vawx.c">
<Filter>meta\Source Files</Filter> <Filter>meta\Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="meta\pc_snds.c"> <ClCompile Include="meta\raw_snds.c">
<Filter>meta\Source Files</Filter> <Filter>meta\Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="meta\sqex_scd.c"> <ClCompile Include="meta\sqex_scd.c">

View File

@ -72,7 +72,7 @@ VGMSTREAM * init_vgmstream_xa(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_ps2_rxws(STREAMFILE *streamFile); VGMSTREAM * init_vgmstream_ps2_rxws(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_ps2_rxw(STREAMFILE *streamFile); VGMSTREAM * init_vgmstream_ps2_rxw(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_ps2_int(STREAMFILE *streamFile); VGMSTREAM * init_vgmstream_raw_int(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_ps2_exst(STREAMFILE *streamFile); VGMSTREAM * init_vgmstream_ps2_exst(STREAMFILE *streamFile);
@ -84,7 +84,7 @@ VGMSTREAM * init_vgmstream_mib_mih(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_ps2_mic(STREAMFILE *streamFile); VGMSTREAM * init_vgmstream_ps2_mic(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_raw(STREAMFILE *streamFile); VGMSTREAM * init_vgmstream_raw_pcm(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_vag(STREAMFILE *streamFile); VGMSTREAM * init_vgmstream_vag(STREAMFILE *streamFile);
@ -94,7 +94,7 @@ VGMSTREAM * init_vgmstream_ps2_ild(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_ps2_pnb(STREAMFILE *streamFile); VGMSTREAM * init_vgmstream_ps2_pnb(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_xbox_wavm(STREAMFILE *streamFile); VGMSTREAM * init_vgmstream_raw_wavm(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_ngc_str(STREAMFILE *streamFile); VGMSTREAM * init_vgmstream_ngc_str(STREAMFILE *streamFile);
@ -266,9 +266,9 @@ VGMSTREAM * init_vgmstream_dec(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_vs(STREAMFILE *streamFile); VGMSTREAM * init_vgmstream_vs(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_xbox_xmu(STREAMFILE *streamFile); VGMSTREAM * init_vgmstream_xmu(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_xbox_xvas(STREAMFILE *streamFile); VGMSTREAM * init_vgmstream_xvas(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_ngc_bh2pcm(STREAMFILE *streamFile); VGMSTREAM * init_vgmstream_ngc_bh2pcm(STREAMFILE *streamFile);
@ -516,7 +516,7 @@ VGMSTREAM * init_vgmstream_lsf_n1nj4n(STREAMFILE* streamFile);
VGMSTREAM * init_vgmstream_vawx(STREAMFILE* streamFile); VGMSTREAM * init_vgmstream_vawx(STREAMFILE* streamFile);
VGMSTREAM * init_vgmstream_pc_snds(STREAMFILE* streamFile); VGMSTREAM * init_vgmstream_raw_snds(STREAMFILE* streamFile);
VGMSTREAM * init_vgmstream_ps2_wmus(STREAMFILE* streamFile); VGMSTREAM * init_vgmstream_ps2_wmus(STREAMFILE* streamFile);

View File

@ -1,63 +0,0 @@
#include "meta.h"
#include "../util.h"
/* .snds - from Incredibles PC */
VGMSTREAM * init_vgmstream_pc_snds(STREAMFILE *streamFile) {
VGMSTREAM * vgmstream = NULL;
char filename[PATH_LIMIT];
size_t file_size;
int i;
/* check extension, case insensitive */
/* this is all we have to go on, snds is completely headerless */
streamFile->get_name(streamFile,filename,sizeof(filename));
if (strcasecmp("snds",filename_extension(filename))) goto fail;
file_size = get_streamfile_size(streamFile);
/* build the VGMSTREAM */
vgmstream = allocate_vgmstream(2,0);
if (!vgmstream) goto fail;
vgmstream->sample_rate = 48000;
/* file seems to be mistakenly 1/8 too long */
vgmstream->num_samples = file_size*8/9;
/* check for 32 0 bytes where the padding should start */
for (i = 0; i < 8; i++)
{
if (read_32bitBE(vgmstream->num_samples+i*4,streamFile) != 0)
{
/* not padding? just play the whole file */
vgmstream->num_samples = file_size;
break;
}
}
vgmstream->coding_type = coding_SNDS_IMA;
vgmstream->layout_type = layout_none;
vgmstream->meta_type = meta_PC_SNDS;
/* open the file for reading */
vgmstream->ch[0].streamfile = vgmstream->ch[1].streamfile =
streamFile->open(streamFile,filename,STREAMFILE_DEFAULT_BUFFER_SIZE);
if (!vgmstream->ch[0].streamfile) goto fail;
vgmstream->ch[0].channel_start_offset=
vgmstream->ch[0].offset=
vgmstream->ch[1].channel_start_offset=
vgmstream->ch[1].offset=0;
return vgmstream;
/* clean up anything we may have opened */
fail:
if (vgmstream) close_vgmstream(vgmstream);
return NULL;
}

View File

@ -1,59 +0,0 @@
#include "meta.h"
#include "../util.h"
/* RAW
RAW format is native 44khz PCM file
Nothing more :P ...
2008-05-17 - Fastelbja : First version ...
*/
VGMSTREAM * init_vgmstream_raw(STREAMFILE *streamFile) {
VGMSTREAM * vgmstream = NULL;
char filename[PATH_LIMIT];
int i;
/* check extension, case insensitive */
streamFile->get_name(streamFile,filename,sizeof(filename));
if (strcasecmp("raw",filename_extension(filename))) goto fail;
/* No check to do as they are raw pcm */
/* build the VGMSTREAM */
vgmstream = allocate_vgmstream(2,0);
if (!vgmstream) goto fail;
/* fill in the vital statistics */
vgmstream->channels = 2;
vgmstream->sample_rate = 44100;
vgmstream->coding_type = coding_PCM16LE;
vgmstream->num_samples = (int32_t)(get_streamfile_size(streamFile)/4);
vgmstream->layout_type = layout_interleave;
vgmstream->interleave_block_size = 2;
vgmstream->meta_type = meta_RAW;
/* open the file for reading by each channel */
{
STREAMFILE *chstreamfile;
/* have both channels use the same buffer, as interleave is so small */
chstreamfile = streamFile->open(streamFile,filename,STREAMFILE_DEFAULT_BUFFER_SIZE);
if (!chstreamfile) goto fail;
for (i=0;i<2;i++) {
vgmstream->ch[i].streamfile = chstreamfile;
vgmstream->ch[i].channel_start_offset=
vgmstream->ch[i].offset=(off_t)(i*vgmstream->interleave_block_size);
}
}
return vgmstream;
/* clean up anything we may have opened */
fail:
if (vgmstream) close_vgmstream(vgmstream);
return NULL;
}

View File

@ -2,7 +2,7 @@
#include "../coding/coding.h" #include "../coding/coding.h"
/* raw PCM file assumed by extension [PaRappa The Rapper 2 (PS2)? , Amplitude (PS2)?] */ /* raw PCM file assumed by extension [PaRappa The Rapper 2 (PS2)? , Amplitude (PS2)?] */
VGMSTREAM * init_vgmstream_ps2_int(STREAMFILE *streamFile) { VGMSTREAM * init_vgmstream_raw_int(STREAMFILE *streamFile) {
VGMSTREAM * vgmstream = NULL; VGMSTREAM * vgmstream = NULL;
off_t start_offset; off_t start_offset;
int channel_count; int channel_count;
@ -16,18 +16,9 @@ VGMSTREAM * init_vgmstream_ps2_int(STREAMFILE *streamFile) {
else else
channel_count = 4; channel_count = 4;
/* try to skip known .int (a horrible idea this parser exists) */ /* ignore .int PS-ADPCM */
{ if (ps_check_format(streamFile, 0x00, 0x10000))
/* ignore A2M .int */ goto fail;
if (read_32bitBE(0x00,streamFile) == 0x41324D00) /* "A2M\0" */
goto fail;
/* ignore EXST .int */
if (read_32bitBE(0x10,streamFile) == 0x0C020000 &&
read_32bitBE(0x20,streamFile) == 0x0C020000 &&
read_32bitBE(0x30,streamFile) == 0x0C020000 &&
read_32bitBE(0x40,streamFile) == 0x0C020000) /* check a few empty PS-ADPCM frames */
goto fail;
}
start_offset = 0x00; start_offset = 0x00;
@ -36,8 +27,8 @@ VGMSTREAM * init_vgmstream_ps2_int(STREAMFILE *streamFile) {
vgmstream = allocate_vgmstream(channel_count,0); vgmstream = allocate_vgmstream(channel_count,0);
if (!vgmstream) goto fail; if (!vgmstream) goto fail;
vgmstream->meta_type = meta_RAW_INT;
vgmstream->sample_rate = 48000; vgmstream->sample_rate = 48000;
vgmstream->meta_type = meta_PS2_RAW;
vgmstream->num_samples = pcm_bytes_to_samples(get_streamfile_size(streamFile), vgmstream->channels, 16); vgmstream->num_samples = pcm_bytes_to_samples(get_streamfile_size(streamFile), vgmstream->channels, 16);
vgmstream->coding_type = coding_PCM16LE; vgmstream->coding_type = coding_PCM16LE;
vgmstream->layout_type = layout_interleave; vgmstream->layout_type = layout_interleave;
@ -48,6 +39,6 @@ VGMSTREAM * init_vgmstream_ps2_int(STREAMFILE *streamFile) {
return vgmstream; return vgmstream;
fail: fail:
if (vgmstream) close_vgmstream(vgmstream); close_vgmstream(vgmstream);
return NULL; return NULL;
} }

38
src/meta/raw_pcm.c Normal file
View File

@ -0,0 +1,38 @@
#include "meta.h"
#include "../coding/coding.h"
/* RAW - RAW format is native 44khz PCM file */
VGMSTREAM * init_vgmstream_raw_pcm(STREAMFILE *streamFile) {
VGMSTREAM * vgmstream = NULL;
off_t start_offset;
int loop_flag, channel_count;
/* checks */
if (!check_extensions(streamFile, "raw"))
goto fail;
channel_count = 2;
loop_flag = 0;
start_offset = 0x00;
/* build the VGMSTREAM */
vgmstream = allocate_vgmstream(channel_count, loop_flag);
if (!vgmstream) goto fail;
vgmstream->meta_type = meta_RAW_PCM;
vgmstream->sample_rate = 44100;
vgmstream->num_samples = pcm_bytes_to_samples(get_streamfile_size(streamFile), channel_count, 16);
vgmstream->coding_type = coding_PCM16LE;
vgmstream->layout_type = layout_interleave;
vgmstream->interleave_block_size = 0x02;
if (!vgmstream_open_stream(vgmstream,streamFile,start_offset))
goto fail;
return vgmstream;
fail:
close_vgmstream(vgmstream);
return NULL;
}

51
src/meta/raw_snds.c Normal file
View File

@ -0,0 +1,51 @@
#include "meta.h"
/* .snds - from Heavy Iron's The Incredibles (PC) */
VGMSTREAM * init_vgmstream_raw_snds(STREAMFILE *streamFile) {
VGMSTREAM * vgmstream = NULL;
off_t start_offset;
int loop_flag, channel_count;
size_t file_size;
int i;
/* checks */
if (!check_extensions(streamFile, "snds"))
goto fail;
loop_flag = 0;
channel_count = 2;
start_offset = 0;
file_size = get_streamfile_size(streamFile);
/* build the VGMSTREAM */
vgmstream = allocate_vgmstream(channel_count, loop_flag);
if (!vgmstream) goto fail;
vgmstream->meta_type = meta_RAW_SNDS;
vgmstream->sample_rate = 48000;
/* file seems to be mistakenly 1/8 too long, check for 32 0 bytes where the padding should start */
vgmstream->num_samples = file_size*8/9;
for (i = 0; i < 8; i++) {
if (read_32bitBE(vgmstream->num_samples+i*4,streamFile) != 0) {
vgmstream->num_samples = file_size; /* no padding? just play the whole file */
break;
}
}
vgmstream->coding_type = coding_SNDS_IMA;
vgmstream->layout_type = layout_none;
if (!vgmstream_open_stream(vgmstream,streamFile,start_offset))
goto fail;
return vgmstream;
fail:
close_vgmstream(vgmstream);
return NULL;
}

View File

@ -2,7 +2,7 @@
#include "../coding/coding.h" #include "../coding/coding.h"
/* WAVM - headerless format which can be found on XBOX */ /* WAVM - headerless format which can be found on XBOX */
VGMSTREAM * init_vgmstream_xbox_wavm(STREAMFILE *streamFile) { VGMSTREAM * init_vgmstream_raw_wavm(STREAMFILE *streamFile) {
VGMSTREAM * vgmstream = NULL; VGMSTREAM * vgmstream = NULL;
off_t start_offset = 0; off_t start_offset = 0;
int loop_flag, channel_count; int loop_flag, channel_count;
@ -19,13 +19,12 @@ VGMSTREAM * init_vgmstream_xbox_wavm(STREAMFILE *streamFile) {
vgmstream = allocate_vgmstream(channel_count,loop_flag); vgmstream = allocate_vgmstream(channel_count,loop_flag);
if (!vgmstream) goto fail; if (!vgmstream) goto fail;
vgmstream->meta_type = meta_RAW_WAVM;
vgmstream->sample_rate = 44100; vgmstream->sample_rate = 44100;
vgmstream->num_samples = xbox_ima_bytes_to_samples(get_streamfile_size(streamFile), vgmstream->channels); vgmstream->num_samples = xbox_ima_bytes_to_samples(get_streamfile_size(streamFile), vgmstream->channels);
vgmstream->coding_type = coding_XBOX_IMA; vgmstream->coding_type = coding_XBOX_IMA;
vgmstream->layout_type = layout_none; vgmstream->layout_type = layout_none;
vgmstream->meta_type = meta_XBOX_WAVM;
if (!vgmstream_open_stream(vgmstream, streamFile, start_offset)) if (!vgmstream_open_stream(vgmstream, streamFile, start_offset))
goto fail; goto fail;

View File

@ -1,8 +1,8 @@
#include "meta.h" #include "meta.h"
#include "../coding/coding.h" #include "../coding/coding.h"
/* XMU- found in Alter Echo (Xbox) */ /* XMU - found in Alter Echo (Xbox) */
VGMSTREAM * init_vgmstream_xbox_xmu(STREAMFILE *streamFile) { VGMSTREAM * init_vgmstream_xmu(STREAMFILE *streamFile) {
VGMSTREAM * vgmstream = NULL; VGMSTREAM * vgmstream = NULL;
size_t start_offset; size_t start_offset;
int loop_flag, channel_count; int loop_flag, channel_count;
@ -25,6 +25,7 @@ VGMSTREAM * init_vgmstream_xbox_xmu(STREAMFILE *streamFile) {
vgmstream = allocate_vgmstream(channel_count,loop_flag); vgmstream = allocate_vgmstream(channel_count,loop_flag);
if (!vgmstream) goto fail; if (!vgmstream) goto fail;
vgmstream->meta_type = meta_XMU;
vgmstream->sample_rate = read_32bitLE(0x10,streamFile); vgmstream->sample_rate = read_32bitLE(0x10,streamFile);
vgmstream->num_samples = xbox_ima_bytes_to_samples(data_size, vgmstream->channels); vgmstream->num_samples = xbox_ima_bytes_to_samples(data_size, vgmstream->channels);
vgmstream->loop_start_sample = 0; vgmstream->loop_start_sample = 0;
@ -32,7 +33,6 @@ VGMSTREAM * init_vgmstream_xbox_xmu(STREAMFILE *streamFile) {
vgmstream->coding_type = coding_XBOX_IMA; vgmstream->coding_type = coding_XBOX_IMA;
vgmstream->layout_type = layout_none; vgmstream->layout_type = layout_none;
vgmstream->meta_type = meta_XBOX_XMU;
if (!vgmstream_open_stream(vgmstream, streamFile, start_offset)) if (!vgmstream_open_stream(vgmstream, streamFile, start_offset))
goto fail; goto fail;

View File

@ -3,7 +3,7 @@
#include "../coding/coding.h" #include "../coding/coding.h"
/* XVAS - found in TMNT 2 & TMNT 3 (Xbox) */ /* XVAS - found in TMNT 2 & TMNT 3 (Xbox) */
VGMSTREAM * init_vgmstream_xbox_xvas(STREAMFILE *streamFile) { VGMSTREAM * init_vgmstream_xvas(STREAMFILE *streamFile) {
VGMSTREAM * vgmstream = NULL; VGMSTREAM * vgmstream = NULL;
off_t start_offset; off_t start_offset;
int loop_flag, channel_count; int loop_flag, channel_count;
@ -28,7 +28,7 @@ VGMSTREAM * init_vgmstream_xbox_xvas(STREAMFILE *streamFile) {
vgmstream = allocate_vgmstream(channel_count,loop_flag); vgmstream = allocate_vgmstream(channel_count,loop_flag);
if (!vgmstream) goto fail; if (!vgmstream) goto fail;
vgmstream->meta_type = meta_XBOX_XVAS; vgmstream->meta_type = meta_XVAS;
vgmstream->sample_rate = read_32bitLE(0x0c,streamFile); vgmstream->sample_rate = read_32bitLE(0x0c,streamFile);
vgmstream->num_samples = xbox_ima_bytes_to_samples(data_size, vgmstream->channels); vgmstream->num_samples = xbox_ima_bytes_to_samples(data_size, vgmstream->channels);
if(loop_flag) { if(loop_flag) {

View File

@ -54,7 +54,6 @@ VGMSTREAM * (*init_vgmstream_functions[])(STREAMFILE *streamFile) = {
init_vgmstream_seb, init_vgmstream_seb,
init_vgmstream_ps2_ild, init_vgmstream_ps2_ild,
init_vgmstream_ps2_pnb, init_vgmstream_ps2_pnb,
init_vgmstream_xbox_wavm,
init_vgmstream_ngc_str, init_vgmstream_ngc_str,
init_vgmstream_ea_schl, init_vgmstream_ea_schl,
init_vgmstream_caf, init_vgmstream_caf,
@ -134,8 +133,8 @@ VGMSTREAM * (*init_vgmstream_functions[])(STREAMFILE *streamFile) = {
init_vgmstream_vs, init_vgmstream_vs,
init_vgmstream_dc_str, init_vgmstream_dc_str,
init_vgmstream_dc_str_v2, init_vgmstream_dc_str_v2,
init_vgmstream_xbox_xmu, init_vgmstream_xmu,
init_vgmstream_xbox_xvas, init_vgmstream_xvas,
init_vgmstream_ngc_bh2pcm, init_vgmstream_ngc_bh2pcm,
init_vgmstream_sat_sap, init_vgmstream_sat_sap,
init_vgmstream_dc_idvi, init_vgmstream_dc_idvi,
@ -480,11 +479,12 @@ VGMSTREAM * (*init_vgmstream_functions[])(STREAMFILE *streamFile) = {
/* lowest priority metas (should go after all metas, and TXTH should go before raw formats) */ /* 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 */ init_vgmstream_txth, /* proper parsers should supersede TXTH, once added */
init_vgmstream_ps2_int, /* .int raw PS-ADPCM */ init_vgmstream_raw_int, /* .int raw PCM */
init_vgmstream_ps_headerless, /* tries to detect a bunch of PS-ADPCM formats */ init_vgmstream_ps_headerless, /* tries to detect a bunch of PS-ADPCM formats */
init_vgmstream_pc_snds, /* .snds PC, after ps_headerless */ init_vgmstream_raw_snds, /* .snds raw SNDS IMA (*after* ps_headerless) */
init_vgmstream_s14_sss, /* .raw siren14 */ init_vgmstream_raw_wavm, /* .wavm raw xbox */
init_vgmstream_raw, /* .raw PCM */ init_vgmstream_raw_pcm, /* .raw raw PCM */
init_vgmstream_s14_sss, /* .s14/sss raw siren14 */
#ifdef VGM_USE_FFMPEG #ifdef VGM_USE_FFMPEG
init_vgmstream_ffmpeg, /* may play anything incorrectly, since FFmpeg doesn't check extensions */ init_vgmstream_ffmpeg, /* may play anything incorrectly, since FFmpeg doesn't check extensions */
#endif #endif

View File

@ -342,7 +342,7 @@ typedef enum {
meta_PS2_SShd, /* .ADS with SShd header */ meta_PS2_SShd, /* .ADS with SShd header */
meta_NPS, meta_NPS,
meta_PS2_RXWS, /* Sony games (Genji, Okage Shadow King, Arc The Lad Twilight of Spirits) */ meta_PS2_RXWS, /* Sony games (Genji, Okage Shadow King, Arc The Lad Twilight of Spirits) */
meta_PS2_RAW, /* RAW Interleaved Format */ meta_RAW_INT,
meta_PS2_EXST, /* Shadow of Colossus EXST */ meta_PS2_EXST, /* Shadow of Colossus EXST */
meta_PS2_SVAG, /* Konami SVAG */ meta_PS2_SVAG, /* Konami SVAG */
meta_PS_HEADERLESS, /* headerless PS-ADPCM */ meta_PS_HEADERLESS, /* headerless PS-ADPCM */
@ -441,24 +441,19 @@ typedef enum {
meta_PS2_XA2_RRP, /* RC Revenge Pro */ meta_PS2_XA2_RRP, /* RC Revenge Pro */
meta_NGC_DSP_KONAMI, /* Konami DSP header, found in various games */ meta_NGC_DSP_KONAMI, /* Konami DSP header, found in various games */
meta_UBI_CKD, /* Ubisoft CKD RIFF header (Rayman Origins Wii) */ meta_UBI_CKD, /* Ubisoft CKD RIFF header (Rayman Origins Wii) */
meta_RAW_WAVM,
meta_XBOX_WAVM, /* XBOX WAVM File */
meta_XBOX_WVS, /* XBOX WVS */ meta_XBOX_WVS, /* XBOX WVS */
meta_NGC_WVS, /* Metal Arms - Glitch in the System */ meta_NGC_WVS, /* Metal Arms - Glitch in the System */
meta_XBOX_MATX, /* XBOX MATX */ meta_XBOX_MATX, /* XBOX MATX */
meta_XBOX_XMU, /* XBOX XMU */ meta_XMU,
meta_XBOX_XVAS, /* XBOX VAS */ meta_XVAS,
meta_EA_SCHL, /* Electronic Arts SCHl with variable header */ meta_EA_SCHL, /* Electronic Arts SCHl with variable header */
meta_EA_SCHL_fixed, /* Electronic Arts SCHl with fixed header */ meta_EA_SCHL_fixed, /* Electronic Arts SCHl with fixed header */
meta_EA_BNK, /* Electronic Arts BNK */ meta_EA_BNK, /* Electronic Arts BNK */
meta_EA_1SNH, /* Electronic Arts 1SNh/EACS */ meta_EA_1SNH, /* Electronic Arts 1SNh/EACS */
meta_EA_EACS, meta_EA_EACS,
meta_RAW_PCM,
meta_RAW, /* RAW PCM file */
meta_GENH, /* generic header */ meta_GENH, /* generic header */
meta_AIFC, /* Audio Interchange File Format AIFF-C */ meta_AIFC, /* Audio Interchange File Format AIFF-C */
meta_AIFF, /* Audio Interchange File Format */ meta_AIFF, /* Audio Interchange File Format */
meta_STR_SNDS, /* .str with SNDS blocks and SHDR header */ meta_STR_SNDS, /* .str with SNDS blocks and SHDR header */
@ -558,7 +553,7 @@ typedef enum {
meta_VS_STR, /* The Bouncer */ meta_VS_STR, /* The Bouncer */
meta_LSF_N1NJ4N, /* .lsf n1nj4n Fastlane Street Racing (iPhone) */ meta_LSF_N1NJ4N, /* .lsf n1nj4n Fastlane Street Racing (iPhone) */
meta_VAWX, /* feelplus: No More Heroes Heroes Paradise, Moon Diver */ meta_VAWX, /* feelplus: No More Heroes Heroes Paradise, Moon Diver */
meta_PC_SNDS, /* Incredibles PC .snds */ meta_RAW_SNDS,
meta_PS2_WMUS, /* The Warriors (PS2) */ meta_PS2_WMUS, /* The Warriors (PS2) */
meta_HYPERSCAN_KVAG, /* Hyperscan KVAG/BVG */ meta_HYPERSCAN_KVAG, /* Hyperscan KVAG/BVG */
meta_IOS_PSND, /* Crash Bandicoot Nitro Kart 2 (iOS) */ meta_IOS_PSND, /* Crash Bandicoot Nitro Kart 2 (iOS) */