mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-18 07:44:43 +01:00
Merge pull request #134 from bxaimc/master
Added AST (ASTL) variant for Dead Rising (PC)
This commit is contained in:
commit
37697d95f5
@ -894,6 +894,7 @@ static const meta_info meta_info_list[] = {
|
|||||||
{meta_AWC, "Rockstar AWC header"},
|
{meta_AWC, "Rockstar AWC header"},
|
||||||
{meta_NSW_OPUS, ".OPUS header"},
|
{meta_NSW_OPUS, ".OPUS header"},
|
||||||
{meta_PC_AL2, "Illwinter Game Design AL2 raw header"},
|
{meta_PC_AL2, "Illwinter Game Design AL2 raw header"},
|
||||||
|
{meta_PC_AST, "Capcom AST header"},
|
||||||
|
|
||||||
#ifdef VGM_USE_VORBIS
|
#ifdef VGM_USE_VORBIS
|
||||||
{meta_OGG_VORBIS, "Ogg Vorbis"},
|
{meta_OGG_VORBIS, "Ogg Vorbis"},
|
||||||
|
@ -661,6 +661,10 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath=".\meta\pc_al2.c"
|
RelativePath=".\meta\pc_al2.c"
|
||||||
>
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\meta\pc_ast.c"
|
||||||
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\meta\pc_mxst.c"
|
RelativePath=".\meta\pc_mxst.c"
|
||||||
|
@ -160,6 +160,7 @@
|
|||||||
<ClCompile Include="meta\nsw_opus.c" />
|
<ClCompile Include="meta\nsw_opus.c" />
|
||||||
<ClCompile Include="meta\nub_vag.c" />
|
<ClCompile Include="meta\nub_vag.c" />
|
||||||
<ClCompile Include="meta\pc_adp.c" />
|
<ClCompile Include="meta\pc_adp.c" />
|
||||||
|
<ClCompile Include="meta\pc_ast.c" />
|
||||||
<ClCompile Include="meta\pc_snds.c" />
|
<ClCompile Include="meta\pc_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" />
|
||||||
|
@ -1183,5 +1183,8 @@
|
|||||||
<ClCompile Include="meta\awc.c">
|
<ClCompile Include="meta\awc.c">
|
||||||
<Filter>meta\Source Files</Filter>
|
<Filter>meta\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="meta\pc_ast.c">
|
||||||
|
<Filter>meta\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -686,4 +686,6 @@ VGMSTREAM * init_vgmstream_nsw_opus(STREAMFILE * streamFile);
|
|||||||
|
|
||||||
VGMSTREAM * init_vgmstream_pc_al2(STREAMFILE * streamFile);
|
VGMSTREAM * init_vgmstream_pc_al2(STREAMFILE * streamFile);
|
||||||
|
|
||||||
|
VGMSTREAM * init_vgmstream_pc_ast(STREAMFILE * streamFile);
|
||||||
|
|
||||||
#endif /*_META_H*/
|
#endif /*_META_H*/
|
||||||
|
44
src/meta/pc_ast.c
Normal file
44
src/meta/pc_ast.c
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
#include "meta.h"
|
||||||
|
#include "../coding/coding.h"
|
||||||
|
|
||||||
|
/* ASTL - found in Dead Rising (PC) */
|
||||||
|
VGMSTREAM * init_vgmstream_pc_ast(STREAMFILE *streamFile) {
|
||||||
|
VGMSTREAM * vgmstream = NULL;
|
||||||
|
off_t start_offset, data_size;
|
||||||
|
int loop_flag, channel_count;
|
||||||
|
|
||||||
|
/* check extension, case insensitive */
|
||||||
|
if ( !check_extensions(streamFile,"ast"))
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
if (read_32bitBE(0x00,streamFile) != 0x4153544C) /* "ASTL" */
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
|
||||||
|
loop_flag = 0; //TODO - Find hidden loop point calc and flag
|
||||||
|
channel_count = read_8bit(0x32, streamFile);
|
||||||
|
data_size = read_32bitLE(0x20,streamFile);
|
||||||
|
|
||||||
|
|
||||||
|
/* build the VGMSTREAM */
|
||||||
|
vgmstream = allocate_vgmstream(channel_count,loop_flag);
|
||||||
|
if (!vgmstream) goto fail;
|
||||||
|
|
||||||
|
/* TODO - Find non-obvious loop points and flag (if any) */
|
||||||
|
start_offset = read_32bitLE(0x10,streamFile);
|
||||||
|
vgmstream->sample_rate = read_32bitLE(0x34,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_PC_AST;
|
||||||
|
|
||||||
|
/* open the file for reading */
|
||||||
|
if ( !vgmstream_open_stream(vgmstream, streamFile, start_offset) )
|
||||||
|
goto fail;
|
||||||
|
return vgmstream;
|
||||||
|
|
||||||
|
fail:
|
||||||
|
close_vgmstream(vgmstream);
|
||||||
|
return NULL;
|
||||||
|
}
|
@ -369,6 +369,7 @@ VGMSTREAM * (*init_vgmstream_fcns[])(STREAMFILE *streamFile) = {
|
|||||||
init_vgmstream_awc,
|
init_vgmstream_awc,
|
||||||
init_vgmstream_nsw_opus,
|
init_vgmstream_nsw_opus,
|
||||||
init_vgmstream_pc_al2,
|
init_vgmstream_pc_al2,
|
||||||
|
init_vgmstream_pc_ast,
|
||||||
|
|
||||||
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
|
||||||
|
@ -629,6 +629,7 @@ typedef enum {
|
|||||||
meta_AWC, /* Rockstar AWC (GTA5, RDR) */
|
meta_AWC, /* Rockstar AWC (GTA5, RDR) */
|
||||||
meta_NSW_OPUS, /* Lego City Undercover (Switch) */
|
meta_NSW_OPUS, /* Lego City Undercover (Switch) */
|
||||||
meta_PC_AL2, /* Conquest of Elysium 3 (PC) */
|
meta_PC_AL2, /* Conquest of Elysium 3 (PC) */
|
||||||
|
meta_PC_AST, /* Dead Rising (PC) */
|
||||||
|
|
||||||
#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