mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-18 07:44:43 +01:00
Add EZW for EZ2DJ (Arcade)
This commit is contained in:
parent
bf41d53690
commit
ed36ae44a3
@ -104,6 +104,7 @@ static const char* extension_list[] = {
|
|||||||
"emff",
|
"emff",
|
||||||
"enth",
|
"enth",
|
||||||
"exa",
|
"exa",
|
||||||
|
"ezw",
|
||||||
|
|
||||||
"fag",
|
"fag",
|
||||||
"ffw",
|
"ffw",
|
||||||
@ -900,6 +901,7 @@ static const meta_info meta_info_list[] = {
|
|||||||
{meta_PC_AL2, "Illwinter Game Design AL2 raw header"},
|
{meta_PC_AL2, "Illwinter Game Design AL2 raw header"},
|
||||||
{meta_PC_AST, "Capcom AST (PC) header"},
|
{meta_PC_AST, "Capcom AST (PC) header"},
|
||||||
{meta_UBI_SB, "Ubisoft SBx header"},
|
{meta_UBI_SB, "Ubisoft SBx header"},
|
||||||
|
{meta_EZW, "EZ2DJ EZWAVE header"},
|
||||||
|
|
||||||
#ifdef VGM_USE_VORBIS
|
#ifdef VGM_USE_VORBIS
|
||||||
{meta_OGG_VORBIS, "Ogg Vorbis"},
|
{meta_OGG_VORBIS, "Ogg Vorbis"},
|
||||||
|
@ -372,6 +372,10 @@
|
|||||||
RelativePath=".\meta\excitebots.c"
|
RelativePath=".\meta\excitebots.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\meta\ezw.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\meta\ffmpeg.c"
|
RelativePath=".\meta\ffmpeg.c"
|
||||||
>
|
>
|
||||||
|
@ -150,6 +150,7 @@
|
|||||||
<ClCompile Include="meta\bfstm.c" />
|
<ClCompile Include="meta\bfstm.c" />
|
||||||
<ClCompile Include="meta\bfwav.c" />
|
<ClCompile Include="meta\bfwav.c" />
|
||||||
<ClCompile Include="meta\excitebots.c" />
|
<ClCompile Include="meta\excitebots.c" />
|
||||||
|
<ClCompile Include="meta\ezw.c" />
|
||||||
<ClCompile Include="meta\ffmpeg.c" />
|
<ClCompile Include="meta\ffmpeg.c" />
|
||||||
<ClCompile Include="meta\g1l.c" />
|
<ClCompile Include="meta\g1l.c" />
|
||||||
<ClCompile Include="meta\ios_psnd.c" />
|
<ClCompile Include="meta\ios_psnd.c" />
|
||||||
|
@ -1198,5 +1198,8 @@
|
|||||||
<ClCompile Include="meta\pc_ast.c">
|
<ClCompile Include="meta\pc_ast.c">
|
||||||
<Filter>meta\Source Files</Filter>
|
<Filter>meta\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="meta\ezw.c">
|
||||||
|
<Filter>meta\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
41
src/meta/ezw.c
Normal file
41
src/meta/ezw.c
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
#include "meta.h"
|
||||||
|
#include "../coding/coding.h"
|
||||||
|
|
||||||
|
/* EZWAVE - EZ2DJ (Arcade) */
|
||||||
|
VGMSTREAM * init_vgmstream_ezw(STREAMFILE *streamFile) {
|
||||||
|
VGMSTREAM * vgmstream = NULL;
|
||||||
|
off_t start_offset, data_size;
|
||||||
|
int loop_flag, channel_count;
|
||||||
|
|
||||||
|
/* check extension, case insensitive */
|
||||||
|
if ( !check_extensions(streamFile,"ezw"))
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
|
||||||
|
loop_flag = 0;
|
||||||
|
channel_count = read_8bit(0x0, streamFile);
|
||||||
|
data_size = read_32bitLE(0xE,streamFile);
|
||||||
|
|
||||||
|
|
||||||
|
/* build the VGMSTREAM */
|
||||||
|
vgmstream = allocate_vgmstream(channel_count,loop_flag);
|
||||||
|
if (!vgmstream) goto fail;
|
||||||
|
|
||||||
|
|
||||||
|
start_offset = 0x12;
|
||||||
|
vgmstream->sample_rate = read_32bitLE(0x2,streamFile);
|
||||||
|
vgmstream->coding_type = coding_PCM16LE;
|
||||||
|
vgmstream->num_samples = data_size/(channel_count*2);
|
||||||
|
vgmstream->layout_type = layout_interleave;
|
||||||
|
vgmstream->interleave_block_size = 0x2;
|
||||||
|
vgmstream->meta_type = meta_EZW;
|
||||||
|
|
||||||
|
/* open the file for reading */
|
||||||
|
if ( !vgmstream_open_stream(vgmstream, streamFile, start_offset) )
|
||||||
|
goto fail;
|
||||||
|
return vgmstream;
|
||||||
|
|
||||||
|
fail:
|
||||||
|
close_vgmstream(vgmstream);
|
||||||
|
return NULL;
|
||||||
|
}
|
@ -689,4 +689,6 @@ VGMSTREAM * init_vgmstream_pc_ast(STREAMFILE * streamFile);
|
|||||||
|
|
||||||
VGMSTREAM * init_vgmstream_ubi_sb(STREAMFILE * streamFile);
|
VGMSTREAM * init_vgmstream_ubi_sb(STREAMFILE * streamFile);
|
||||||
|
|
||||||
|
VGMSTREAM * init_vgmstream_ezw(STREAMFILE * streamFile);
|
||||||
|
|
||||||
#endif /*_META_H*/
|
#endif /*_META_H*/
|
||||||
|
@ -369,6 +369,7 @@ VGMSTREAM * (*init_vgmstream_fcns[])(STREAMFILE *streamFile) = {
|
|||||||
init_vgmstream_pc_al2,
|
init_vgmstream_pc_al2,
|
||||||
init_vgmstream_pc_ast,
|
init_vgmstream_pc_ast,
|
||||||
init_vgmstream_ubi_sb,
|
init_vgmstream_ubi_sb,
|
||||||
|
init_vgmstream_ezw,
|
||||||
|
|
||||||
init_vgmstream_txth, /* should go at the end (lower priority) */
|
init_vgmstream_txth, /* should go at the end (lower priority) */
|
||||||
#ifdef VGM_USE_FFMPEG
|
#ifdef VGM_USE_FFMPEG
|
||||||
|
@ -628,6 +628,7 @@ typedef enum {
|
|||||||
meta_PC_AL2, /* Conquest of Elysium 3 (PC) */
|
meta_PC_AL2, /* Conquest of Elysium 3 (PC) */
|
||||||
meta_PC_AST, /* Dead Rising (PC) */
|
meta_PC_AST, /* Dead Rising (PC) */
|
||||||
meta_UBI_SB, /* Ubisoft banks */
|
meta_UBI_SB, /* Ubisoft banks */
|
||||||
|
meta_EZW, /* EZ2DJ (Arcade) EZWAV */
|
||||||
|
|
||||||
#ifdef VGM_USE_VORBIS
|
#ifdef VGM_USE_VORBIS
|
||||||
meta_OGG_VORBIS, /* Ogg Vorbis */
|
meta_OGG_VORBIS, /* Ogg Vorbis */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user