mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-13 18:20:50 +01:00
Add PS3_VAWX. Attempting to verify 6-channel files.
git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@909 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
parent
a563156be4
commit
e4c1a9de5b
@ -469,6 +469,7 @@ bool input_vgmstream::g_is_our_path(const char * p_path,const char * p_extension
|
|||||||
|
|
||||||
if(!stricmp_utf8(p_extension,"vag")) return 1;
|
if(!stricmp_utf8(p_extension,"vag")) return 1;
|
||||||
if(!stricmp_utf8(p_extension,"vas")) return 1;
|
if(!stricmp_utf8(p_extension,"vas")) return 1;
|
||||||
|
if(!stricmp_utf8(p_extension,"vawx")) return 1;
|
||||||
if(!stricmp_utf8(p_extension,"vb")) return 1;
|
if(!stricmp_utf8(p_extension,"vb")) return 1;
|
||||||
if(!stricmp_utf8(p_extension,"vgs")) return 1;
|
if(!stricmp_utf8(p_extension,"vgs")) return 1;
|
||||||
if(!stricmp_utf8(p_extension,"vgv")) return 1;
|
if(!stricmp_utf8(p_extension,"vgv")) return 1;
|
||||||
|
@ -272,7 +272,8 @@ META_OBJS=meta/adx_header.o \
|
|||||||
meta/x360_tra.o \
|
meta/x360_tra.o \
|
||||||
meta/ps2_iab.o \
|
meta/ps2_iab.o \
|
||||||
meta/ps2_strlr.o \
|
meta/ps2_strlr.o \
|
||||||
meta/lsf.o
|
meta/lsf.o \
|
||||||
|
meta/ps3_vawx.o
|
||||||
|
|
||||||
OBJECTS=vgmstream.o streamfile.o util.o $(CODING_OBJS) $(LAYOUT_OBJS) $(META_OBJS)
|
OBJECTS=vgmstream.o streamfile.o util.o $(CODING_OBJS) $(LAYOUT_OBJS) $(META_OBJS)
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="9,00"
|
Version="9.00"
|
||||||
Name="libvgmstream"
|
Name="libvgmstream"
|
||||||
ProjectGUID="{54A6AD11-5369-4895-A06F-E255ABB99B11}"
|
ProjectGUID="{54A6AD11-5369-4895-A06F-E255ABB99B11}"
|
||||||
RootNamespace="libvgmstream"
|
RootNamespace="libvgmstream"
|
||||||
@ -18,7 +18,7 @@
|
|||||||
<Configurations>
|
<Configurations>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|Win32"
|
Name="Debug|Win32"
|
||||||
OutputDirectory="C:\Program Files\Winamp\Plugins"
|
OutputDirectory="H:\Program Files\Winamp\Plugins"
|
||||||
IntermediateDirectory="$(ConfigurationName)"
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
>
|
>
|
||||||
@ -858,6 +858,10 @@
|
|||||||
RelativePath=".\meta\ps3_sgh_sgb.c"
|
RelativePath=".\meta\ps3_sgh_sgb.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\meta\ps3_vawx.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\meta\ps3_xvag.c"
|
RelativePath=".\meta\ps3_xvag.c"
|
||||||
>
|
>
|
||||||
|
@ -220,5 +220,6 @@ libmeta_la_SOURCES += x360_tra.c
|
|||||||
libmeta_la_SOURCES += ps2_iab.c
|
libmeta_la_SOURCES += ps2_iab.c
|
||||||
libmeta_la_SOURCES += ps2_strlr.c
|
libmeta_la_SOURCES += ps2_strlr.c
|
||||||
libmeta_la_SOURCES += lsf.c
|
libmeta_la_SOURCES += lsf.c
|
||||||
|
libmeta_la_SOURCES += ps3_vawx.c
|
||||||
|
|
||||||
EXTRA_DIST = meta.h
|
EXTRA_DIST = meta.h
|
||||||
|
@ -555,4 +555,6 @@ VGMSTREAM * init_vgmstream_ps2_strlr(STREAMFILE* streamFile);
|
|||||||
|
|
||||||
VGMSTREAM * init_vgmstream_lsf_n1nj4n(STREAMFILE* streamFile);
|
VGMSTREAM * init_vgmstream_lsf_n1nj4n(STREAMFILE* streamFile);
|
||||||
|
|
||||||
|
VGMSTREAM * init_vgmstream_ps3_vawx(STREAMFILE* streamFile);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
74
src/meta/ps3_vawx.c
Normal file
74
src/meta/ps3_vawx.c
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
#include "meta.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
|
/* VAWX
|
||||||
|
- No More Heroes: Heroes Paradise (PS3)
|
||||||
|
*/
|
||||||
|
VGMSTREAM * init_vgmstream_ps3_vawx(STREAMFILE *streamFile)
|
||||||
|
{
|
||||||
|
VGMSTREAM * vgmstream = NULL;
|
||||||
|
char filename[260];
|
||||||
|
|
||||||
|
size_t fileLength;
|
||||||
|
off_t readOffset = 0;
|
||||||
|
off_t start_offset;
|
||||||
|
off_t loop_start_offset;
|
||||||
|
off_t loop_end_offset;
|
||||||
|
|
||||||
|
int loop_flag = 0;
|
||||||
|
int channel_count;
|
||||||
|
|
||||||
|
/* check extension, case insensitive */
|
||||||
|
streamFile->get_name(streamFile,filename,sizeof(filename));
|
||||||
|
if (strcasecmp("vawx",filename_extension(filename))) goto fail;
|
||||||
|
|
||||||
|
/* check header */
|
||||||
|
if (read_32bitBE(0x00,streamFile) != 0x56415758) // "VAWX"
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
channel_count = read_8bit(0x39,streamFile);;
|
||||||
|
|
||||||
|
/* build the VGMSTREAM */
|
||||||
|
vgmstream = allocate_vgmstream(channel_count,loop_flag);
|
||||||
|
if (!vgmstream) goto fail;
|
||||||
|
|
||||||
|
/* fill in the vital statistics */
|
||||||
|
start_offset = 0x800;
|
||||||
|
vgmstream->channels = channel_count;
|
||||||
|
vgmstream->sample_rate = read_32bitBE(0x40,streamFile);
|
||||||
|
vgmstream->coding_type = coding_PSX;
|
||||||
|
vgmstream->num_samples = ((get_streamfile_size(streamFile)-start_offset)/16/channel_count*28);
|
||||||
|
|
||||||
|
if (loop_flag)
|
||||||
|
{
|
||||||
|
vgmstream->loop_start_sample = loop_start_offset/16/channel_count*28;
|
||||||
|
vgmstream->loop_end_sample = loop_end_offset/16/channel_count*28;
|
||||||
|
}
|
||||||
|
|
||||||
|
vgmstream->layout_type = layout_interleave;
|
||||||
|
vgmstream->interleave_block_size = 0x10;
|
||||||
|
vgmstream->meta_type = meta_PS3_VAWX;
|
||||||
|
|
||||||
|
/* 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;
|
||||||
|
}
|
@ -299,6 +299,7 @@ VGMSTREAM * (*init_vgmstream_fcns[])(STREAMFILE *streamFile) = {
|
|||||||
init_vgmstream_ps2_iab,
|
init_vgmstream_ps2_iab,
|
||||||
init_vgmstream_ps2_strlr,
|
init_vgmstream_ps2_strlr,
|
||||||
init_vgmstream_lsf_n1nj4n,
|
init_vgmstream_lsf_n1nj4n,
|
||||||
|
init_vgmstream_ps3_vawx,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define INIT_VGMSTREAM_FCNS (sizeof(init_vgmstream_fcns)/sizeof(init_vgmstream_fcns[0]))
|
#define INIT_VGMSTREAM_FCNS (sizeof(init_vgmstream_fcns)/sizeof(init_vgmstream_fcns[0]))
|
||||||
@ -2779,6 +2780,9 @@ void describe_vgmstream(VGMSTREAM * vgmstream, char * desc, int length) {
|
|||||||
break;
|
break;
|
||||||
case meta_LSF_N1NJ4N:
|
case meta_LSF_N1NJ4N:
|
||||||
snprintf(temp,TEMPSIZE,".lsf !n1nj4n header");
|
snprintf(temp,TEMPSIZE,".lsf !n1nj4n header");
|
||||||
|
break;
|
||||||
|
case meta_PS3_VAWX:
|
||||||
|
snprintf(temp,TEMPSIZE,"VAWX header");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
snprintf(temp,TEMPSIZE,"THEY SHOULD HAVE SENT A POET");
|
snprintf(temp,TEMPSIZE,"THEY SHOULD HAVE SENT A POET");
|
||||||
|
@ -510,6 +510,7 @@ typedef enum {
|
|||||||
meta_PS2_IAB, // Ueki no Housoku - Taosu ze Robert Juudan!! (PS2)
|
meta_PS2_IAB, // Ueki no Housoku - Taosu ze Robert Juudan!! (PS2)
|
||||||
meta_PS2_STRLR,
|
meta_PS2_STRLR,
|
||||||
meta_LSF_N1NJ4N, /* .lsf n1nj4n Fastlane Street Racing (iPhone) */
|
meta_LSF_N1NJ4N, /* .lsf n1nj4n Fastlane Street Racing (iPhone) */
|
||||||
|
meta_PS3_VAWX, // No More Heroes: Heroes Paradise (PS3)
|
||||||
} meta_t;
|
} meta_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -225,6 +225,7 @@ gchar *vgmstream_exts [] = {
|
|||||||
|
|
||||||
"vag",
|
"vag",
|
||||||
"vas",
|
"vas",
|
||||||
|
"vawx",
|
||||||
"vb",
|
"vb",
|
||||||
"vgs",
|
"vgs",
|
||||||
"vgv",
|
"vgv",
|
||||||
|
@ -295,6 +295,7 @@ char * extension_list[] = {
|
|||||||
|
|
||||||
"vag\0VAG Audio File (*.VAG)\0",
|
"vag\0VAG Audio File (*.VAG)\0",
|
||||||
"vas\0VAS Audio File (*.VAS)\0",
|
"vas\0VAS Audio File (*.VAS)\0",
|
||||||
|
"vawx\0VAWX Audio File (*.VAWX)\0",
|
||||||
"vb\0VB Audio File (*.VB)\0",
|
"vb\0VB Audio File (*.VB)\0",
|
||||||
"vgs\0VGS Audio File (*.VGS)\0",
|
"vgs\0VGS Audio File (*.VGS)\0",
|
||||||
"vig\0VIG Audio File (*.VIG)\0",
|
"vig\0VIG Audio File (*.VIG)\0",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="9,00"
|
Version="9.00"
|
||||||
Name="in_vgmstream"
|
Name="in_vgmstream"
|
||||||
ProjectGUID="{42D86561-8CE4-40F5-86CE-58C986B77502}"
|
ProjectGUID="{42D86561-8CE4-40F5-86CE-58C986B77502}"
|
||||||
RootNamespace="in_vgmstream"
|
RootNamespace="in_vgmstream"
|
||||||
@ -18,8 +18,8 @@
|
|||||||
<Configurations>
|
<Configurations>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|Win32"
|
Name="Debug|Win32"
|
||||||
OutputDirectory="C:\Program Files\Winamp\Plugins"
|
OutputDirectory="H:\Program Files\Winamp\Plugins"
|
||||||
IntermediateDirectory="C:\Program Files\Winamp\Plugins"
|
IntermediateDirectory="H:\Program Files\Winamp\Plugins"
|
||||||
ConfigurationType="2"
|
ConfigurationType="2"
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
|
Loading…
Reference in New Issue
Block a user