.ass added - Dai Senryaku VII - Exceed (PS2)

git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@468 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
manakoAT 2008-11-11 10:02:52 +00:00
parent 9deacaa34b
commit 317600fb3a
8 changed files with 83 additions and 1 deletions

View File

@ -143,7 +143,8 @@ META_OBJS=meta/adx_header.o \
meta/wii_mus.o \
meta/dc_asd.o \
meta/naomi_spsd.o \
meta/bgw.o
meta/bgw.o \
meta/ps2_ass.o
OBJECTS=vgmstream.o streamfile.o util.o $(CODING_OBJS) $(LAYOUT_OBJS) $(META_OBJS)

View File

@ -389,6 +389,10 @@
RelativePath=".\meta\ps2_ads.c"
>
</File>
<File
RelativePath=".\meta\ps2_ass.c"
>
</File>
<File
RelativePath=".\meta\ps2_aus.c"
>

View File

@ -112,4 +112,5 @@ libmeta_la_SOURCES += wii_mus.c
libmeta_la_SOURCES += dc_asd.c
libmeta_la_SOURCES += naomi_spsd.c
libmeta_la_SOURCES += bgw.c
libmeta_la_SOURCES += ps2_ass.c
EXTRA_DIST = meta.h

View File

@ -267,4 +267,6 @@ VGMSTREAM * init_vgmstream_bgw(STREAMFILE * streamFile);
VGMSTREAM * init_vgmstream_spw(STREAMFILE * streamFile);
VGMSTREAM * init_vgmstream_ps2_ass(STREAMFILE * streamFile);
#endif

67
src/meta/ps2_ass.c Normal file
View File

@ -0,0 +1,67 @@
#include "meta.h"
#include "../util.h"
/* SVS (from Dai Senryaku VII - Exceed) */
VGMSTREAM * init_vgmstream_ps2_ass(STREAMFILE *streamFile) {
VGMSTREAM * vgmstream = NULL;
char filename[260];
off_t start_offset;
int loop_flag;
int channel_count;
/* check extension, case insensitive */
streamFile->get_name(streamFile,filename,sizeof(filename));
if (strcasecmp("ass",filename_extension(filename))) goto fail;
/* check header */
if (read_32bitBE(0x00,streamFile) != 0x02000000) /* "00000000" */
goto fail;
loop_flag = 1;
channel_count = 2;
/* 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_32bitLE(0x04,streamFile);
vgmstream->coding_type = coding_PSX;
vgmstream->num_samples = (read_32bitLE(0x08,streamFile)*2)*28/16/channel_count;
if(loop_flag) {
vgmstream->loop_start_sample = 0;
vgmstream->loop_end_sample=(read_32bitLE(0x08,streamFile)*2)*28/16/channel_count;
}
vgmstream->layout_type = layout_interleave;
vgmstream->interleave_block_size = read_32bitLE(0x0C,streamFile);
vgmstream->meta_type = meta_PS2_ASS;
/* 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;
}

View File

@ -150,6 +150,7 @@ VGMSTREAM * (*init_vgmstream_fcns[])(STREAMFILE *streamFile) = {
init_vgmstream_rsd6xadp,
init_vgmstream_bgw,
init_vgmstream_spw,
init_vgmstream_ps2_ass,
};
#define INIT_VGMSTREAM_FCNS (sizeof(init_vgmstream_fcns)/sizeof(init_vgmstream_fcns[0]))
@ -1785,6 +1786,9 @@ void describe_vgmstream(VGMSTREAM * vgmstream, char * desc, int length) {
case meta_FFXI_SPW:
snprintf(temp,TEMPSIZE,"SPW SeWave header");
break;
case meta_PS2_ASS:
snprintf(temp,TEMPSIZE,"ASS header");
break;
default:
snprintf(temp,TEMPSIZE,"THEY SHOULD HAVE SENT A POET");
}

View File

@ -257,6 +257,8 @@ typedef enum {
meta_RSD6WADP, /* RSD6WADP */
meta_RSD6XADP, /* RSD6XADP */
meta_PS2_ASS, /* RSD6XADP */
meta_XBOX_WAVM, /* XBOX WAVM File */
meta_XBOX_RIFF, /* XBOX RIFF/WAVE File */
meta_XBOX_WVS, /* XBOX WVS */

View File

@ -194,6 +194,7 @@ char * extension_list[] = {
"spsd\0SPSD Audio File (*.SPSD)\0",
"bgw\0BGW Audio File (*.BGW)\0",
"spw\0SPW Audio File (*.SPW)\0",
"ass\0ASS Audio File (*.ASS)\0",
};
void about(HWND hwndParent) {