mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-12 01:30:49 +01:00
ZSD (UGLY!)
git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@600 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
parent
bd06b59a7d
commit
d2e943af3a
@ -126,6 +126,7 @@ GC/Wii DSP ADPCM:
|
|||||||
- .ssm
|
- .ssm
|
||||||
- .stm/.dsp
|
- .stm/.dsp
|
||||||
- .str
|
- .str
|
||||||
|
- .str+.sth
|
||||||
- .sts
|
- .sts
|
||||||
- .swd
|
- .swd
|
||||||
- .thp, .dsp
|
- .thp, .dsp
|
||||||
@ -153,6 +154,7 @@ PCM:
|
|||||||
- .str (16 bit)
|
- .str (16 bit)
|
||||||
- .wav, .lwav (unsigned 8 bit, 16 bit)
|
- .wav, .lwav (unsigned 8 bit, 16 bit)
|
||||||
- .xss (16 bit)
|
- .xss (16 bit)
|
||||||
|
- .zsd (8 bit)
|
||||||
|
|
||||||
Xbox IMA ADPCM:
|
Xbox IMA ADPCM:
|
||||||
- .matx
|
- .matx
|
||||||
|
@ -184,7 +184,8 @@ META_OBJS=meta/adx_header.o \
|
|||||||
meta/nds_rrds.o \
|
meta/nds_rrds.o \
|
||||||
meta/ps2_tk5.o \
|
meta/ps2_tk5.o \
|
||||||
meta/ads.o \
|
meta/ads.o \
|
||||||
meta/wii_str.o
|
meta/wii_str.o \
|
||||||
|
meta/zsd.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)
|
||||||
|
|
||||||
|
@ -774,6 +774,10 @@
|
|||||||
RelativePath=".\meta\ydsp.c"
|
RelativePath=".\meta\ydsp.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\meta\zsd.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\meta\zwdsp.c"
|
RelativePath=".\meta\zwdsp.c"
|
||||||
>
|
>
|
||||||
|
@ -145,5 +145,6 @@ libmeta_la_SOURCES += nds_rrds.c
|
|||||||
libmeta_la_SOURCES += ps2_tk5.c
|
libmeta_la_SOURCES += ps2_tk5.c
|
||||||
libmeta_la_SOURCES += ads.c
|
libmeta_la_SOURCES += ads.c
|
||||||
libmeta_la_SOURCES += wii_str.c
|
libmeta_la_SOURCES += wii_str.c
|
||||||
|
libmeta_la_SOURCES += zsd.c
|
||||||
|
|
||||||
EXTRA_DIST = meta.h
|
EXTRA_DIST = meta.h
|
||||||
|
@ -355,4 +355,6 @@ VGMSTREAM * init_vgmstream_ads(STREAMFILE *streamFile);
|
|||||||
|
|
||||||
VGMSTREAM * init_vgmstream_wii_str(STREAMFILE *streamFile);
|
VGMSTREAM * init_vgmstream_wii_str(STREAMFILE *streamFile);
|
||||||
|
|
||||||
|
VGMSTREAM * init_vgmstream_zsd(STREAMFILE *streamFile);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
60
src/meta/zsd.c
Normal file
60
src/meta/zsd.c
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
#include "meta.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
|
/* ZSD (Dragon Booster) */
|
||||||
|
VGMSTREAM * init_vgmstream_zsd(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("zsd",filename_extension(filename))) goto fail;
|
||||||
|
|
||||||
|
/* check header */
|
||||||
|
if (read_32bitBE(0x00,streamFile) != 0x5A534400) goto fail;
|
||||||
|
|
||||||
|
loop_flag = 0;
|
||||||
|
channel_count = 1;
|
||||||
|
|
||||||
|
/* build the VGMSTREAM */
|
||||||
|
vgmstream = allocate_vgmstream(channel_count,loop_flag);
|
||||||
|
if (!vgmstream) goto fail;
|
||||||
|
|
||||||
|
/* fill in the vital statistics */
|
||||||
|
start_offset = read_32bitLE(0x20,streamFile);
|
||||||
|
vgmstream->channels = channel_count;
|
||||||
|
vgmstream->sample_rate = read_32bitLE(0x10,streamFile);
|
||||||
|
vgmstream->coding_type = coding_PCM8;
|
||||||
|
vgmstream->num_samples = read_32bitLE(0x18,streamFile)/channel_count;
|
||||||
|
vgmstream->interleave_block_size=0x0;
|
||||||
|
|
||||||
|
vgmstream->layout_type = layout_none;
|
||||||
|
vgmstream->meta_type = meta_ZSD;
|
||||||
|
|
||||||
|
|
||||||
|
/* 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;
|
||||||
|
}
|
@ -197,6 +197,7 @@ VGMSTREAM * (*init_vgmstream_fcns[])(STREAMFILE *streamFile) = {
|
|||||||
init_vgmstream_ps2_vsf_tta,
|
init_vgmstream_ps2_vsf_tta,
|
||||||
init_vgmstream_ads,
|
init_vgmstream_ads,
|
||||||
init_vgmstream_wii_str,
|
init_vgmstream_wii_str,
|
||||||
|
init_vgmstream_zsd,
|
||||||
};
|
};
|
||||||
|
|
||||||
#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]))
|
||||||
@ -2103,6 +2104,9 @@ void describe_vgmstream(VGMSTREAM * vgmstream, char * desc, int length) {
|
|||||||
case meta_WII_STR:
|
case meta_WII_STR:
|
||||||
snprintf(temp,TEMPSIZE,"HOTD Overkill - STR+STH WII Header");
|
snprintf(temp,TEMPSIZE,"HOTD Overkill - STR+STH WII Header");
|
||||||
break;
|
break;
|
||||||
|
case meta_ZSD:
|
||||||
|
snprintf(temp,TEMPSIZE,"ZSD Header");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
snprintf(temp,TEMPSIZE,"THEY SHOULD HAVE SENT A POET");
|
snprintf(temp,TEMPSIZE,"THEY SHOULD HAVE SENT A POET");
|
||||||
}
|
}
|
||||||
|
@ -376,6 +376,7 @@ typedef enum {
|
|||||||
meta_NGC_IADP, /* Gamecube Interleave DSP */
|
meta_NGC_IADP, /* Gamecube Interleave DSP */
|
||||||
meta_PS2_TK5, /* Tekken 5 Stream Files */
|
meta_PS2_TK5, /* Tekken 5 Stream Files */
|
||||||
meta_WII_STR, /* House of The Dead Overkill STR+STH */
|
meta_WII_STR, /* House of The Dead Overkill STR+STH */
|
||||||
|
meta_ZSD, /* Dragon Booster ZSD */
|
||||||
} meta_t;
|
} meta_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -166,6 +166,7 @@ gchar *vgmstream_exts [] = {
|
|||||||
"swav",
|
"swav",
|
||||||
"rrds",
|
"rrds",
|
||||||
"tk5",
|
"tk5",
|
||||||
|
"zsd",
|
||||||
/* terminator */
|
/* terminator */
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
@ -229,6 +229,7 @@ char * extension_list[] = {
|
|||||||
"vb\0VB Audio File (*.VB)\0",
|
"vb\0VB Audio File (*.VB)\0",
|
||||||
"tk5\0TK5 Audio File (*.TK5)\0",
|
"tk5\0TK5 Audio File (*.TK5)\0",
|
||||||
"rrds\0RRDS Audio File (*.RRDS)\0",
|
"rrds\0RRDS Audio File (*.RRDS)\0",
|
||||||
|
"zsd\0ZSD Audio File (*.ZSD)\0",
|
||||||
};
|
};
|
||||||
|
|
||||||
void about(HWND hwndParent) {
|
void about(HWND hwndParent) {
|
||||||
|
Loading…
Reference in New Issue
Block a user