mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-12-01 01:27:20 +01:00
Remove .tk5 fake extension (use TXTH + .ovb)
This commit is contained in:
parent
8ffae9f070
commit
bb9b20238c
@ -405,7 +405,7 @@ static const char* extension_list[] = {
|
||||
"opusx",
|
||||
"otm",
|
||||
"oto", //txth/reserved [Vampire Savior (SAT)]
|
||||
"ovb",
|
||||
"ovb", //txth/semi [namCollection: Tekken (PS2), Tekken 5: Tekken 1-3 (PS2)]
|
||||
|
||||
"p04", //txth/reserved [Psychic Force 2012 (DC), Skies of Arcadia (DC)]
|
||||
"p16", //txth/reserved [Astal (SAT)]
|
||||
@ -561,7 +561,6 @@ static const char* extension_list[] = {
|
||||
"tgq",
|
||||
"tgv",
|
||||
"thp",
|
||||
"tk5",
|
||||
"tmx",
|
||||
"tra",
|
||||
"trk",
|
||||
@ -1138,7 +1137,6 @@ static const meta_info meta_info_list[] = {
|
||||
{meta_SWAV, "Nintendo SWAV header"},
|
||||
{meta_VSF, "Square-Enix VSF header"},
|
||||
{meta_NDS_RRDS, "Ridger Racer DS Header"},
|
||||
{meta_PS2_TK5, "Tekken 5 Stream Header"},
|
||||
{meta_PS2_SND, "Might and Magic SSND Header"},
|
||||
{meta_PS2_VSF_TTA, "VSF with SMSS Header"},
|
||||
{meta_ADS_MIDWAY, "Midway ADS header"},
|
||||
@ -1187,7 +1185,6 @@ static const meta_info meta_info_list[] = {
|
||||
{meta_NGC_RKV, "Legacy of Kain - Blood Omen 2 RKV GC header"},
|
||||
{meta_DSP_DDSP, ".DDSP header"},
|
||||
{meta_P3D, "Radical P3D header"},
|
||||
{meta_PS2_TK1, "Tekken TK5STRM1 Header"},
|
||||
{meta_NGC_DSP_MPDS, "MPDS DSP header"},
|
||||
{meta_DSP_STR_IG, "Infogrames .DSP header"},
|
||||
{meta_EA_SWVR, "Electronic Arts SWVR header"},
|
||||
|
@ -575,7 +575,6 @@
|
||||
<ClCompile Include="meta\ps2_smpl.c" />
|
||||
<ClCompile Include="meta\ps2_snd.c" />
|
||||
<ClCompile Include="meta\ps2_sps.c" />
|
||||
<ClCompile Include="meta\ps2_tk5.c" />
|
||||
<ClCompile Include="meta\ps2_va3.c" />
|
||||
<ClCompile Include="meta\ps2_vas.c" />
|
||||
<ClCompile Include="meta\ps2_vbk.c" />
|
||||
|
@ -1546,9 +1546,6 @@
|
||||
<ClCompile Include="meta\ps2_sps.c">
|
||||
<Filter>meta\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="meta\ps2_tk5.c">
|
||||
<Filter>meta\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="meta\ps2_va3.c">
|
||||
<Filter>meta\Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -373,9 +373,6 @@ VGMSTREAM * init_vgmstream_vsf(STREAMFILE *streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_nds_rrds(STREAMFILE *streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_ps2_tk5(STREAMFILE *streamFile);
|
||||
VGMSTREAM * init_vgmstream_ps2_tk1(STREAMFILE* streamFile);
|
||||
|
||||
VGMSTREAM * init_vgmstream_ps2_vsf_tta(STREAMFILE *streamFile);
|
||||
|
||||
VGMSTREAM* init_vgmstream_ads_midway(STREAMFILE* sf);
|
||||
|
@ -1,108 +0,0 @@
|
||||
#include "meta.h"
|
||||
#include "../coding/coding.h"
|
||||
|
||||
/* TK5 (Tekken 5 Streams) */
|
||||
VGMSTREAM * init_vgmstream_ps2_tk5(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
char filename[PATH_LIMIT];
|
||||
off_t start_offset;
|
||||
int loop_flag = 0;
|
||||
int channel_count;
|
||||
|
||||
/* check extension, case insensitive */
|
||||
streamFile->get_name(streamFile,filename,sizeof(filename));
|
||||
if (strcasecmp("tk5",filename_extension(filename))) goto fail;
|
||||
|
||||
/* check header */
|
||||
if (read_32bitBE(0x00,streamFile) != 0x544B3553)
|
||||
goto fail;
|
||||
|
||||
loop_flag = (read_32bitLE(0x0C,streamFile)!=0);
|
||||
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 = 48000;
|
||||
vgmstream->coding_type = coding_PSX_badflags;
|
||||
vgmstream->num_samples = ((get_streamfile_size(streamFile)-0x800))/16*28/2;
|
||||
vgmstream->layout_type = layout_interleave;
|
||||
vgmstream->interleave_block_size = 0x10;
|
||||
vgmstream->meta_type = meta_PS2_TK5;
|
||||
|
||||
if (vgmstream->loop_flag)
|
||||
{
|
||||
vgmstream->loop_start_sample = read_32bitLE(0x08,streamFile)/16*28;
|
||||
vgmstream->loop_end_sample = vgmstream->loop_start_sample + (read_32bitLE(0x0C,streamFile)/16*28);
|
||||
}
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/* OVB - Tekken 5 Streams from Tekken (NamCollection) */
|
||||
VGMSTREAM * init_vgmstream_ps2_tk1(STREAMFILE *streamFile) {
|
||||
VGMSTREAM * vgmstream = NULL;
|
||||
off_t start_offset;
|
||||
int loop_flag = 0, channel_count;
|
||||
|
||||
/* checks */
|
||||
if (!check_extensions(streamFile, "ovb"))
|
||||
goto fail;
|
||||
|
||||
if (read_32bitBE(0x00,streamFile) != 0x544B3553)
|
||||
goto fail;
|
||||
|
||||
loop_flag = (read_32bitLE(0x0C,streamFile)!=0);
|
||||
channel_count = 2;
|
||||
start_offset = 0x800;
|
||||
/* NamCollection uses 44100 while Tekken 5 48000, no apparent way to tell them apart */
|
||||
|
||||
/* build the VGMSTREAM */
|
||||
vgmstream = allocate_vgmstream(channel_count,loop_flag);
|
||||
if (!vgmstream) goto fail;
|
||||
|
||||
vgmstream->sample_rate = 44100;
|
||||
vgmstream->num_samples = ps_bytes_to_samples(read_32bitLE(0x08,streamFile)*channel_count, channel_count);
|
||||
if (vgmstream->loop_flag) {
|
||||
vgmstream->loop_start_sample = read_32bitLE(0x08,streamFile)/16*28;
|
||||
vgmstream->loop_end_sample = vgmstream->loop_start_sample + ps_bytes_to_samples(read_32bitLE(0x0c,streamFile)*channel_count, channel_count);
|
||||
}
|
||||
|
||||
vgmstream->coding_type = coding_PSX_badflags;
|
||||
vgmstream->layout_type = layout_interleave;
|
||||
vgmstream->interleave_block_size = 0x10;
|
||||
vgmstream->meta_type = meta_PS2_TK1;
|
||||
|
||||
if (!vgmstream_open_stream(vgmstream,streamFile,start_offset))
|
||||
goto fail;
|
||||
return vgmstream;
|
||||
|
||||
fail:
|
||||
close_vgmstream(vgmstream);
|
||||
return NULL;
|
||||
}
|
@ -167,7 +167,6 @@ init_vgmstream_t init_vgmstream_functions[] = {
|
||||
init_vgmstream_swav,
|
||||
init_vgmstream_vsf,
|
||||
init_vgmstream_nds_rrds,
|
||||
init_vgmstream_ps2_tk5,
|
||||
init_vgmstream_ps2_vsf_tta,
|
||||
init_vgmstream_ads_midway,
|
||||
init_vgmstream_ps2_mcg,
|
||||
@ -214,7 +213,6 @@ init_vgmstream_t init_vgmstream_functions[] = {
|
||||
init_vgmstream_ngc_rkv,
|
||||
init_vgmstream_dsp_ddsp,
|
||||
init_vgmstream_p3d,
|
||||
init_vgmstream_ps2_tk1,
|
||||
init_vgmstream_ngc_dsp_mpds,
|
||||
init_vgmstream_dsp_str_ig,
|
||||
init_vgmstream_ea_swvr,
|
||||
|
@ -438,7 +438,6 @@ typedef enum {
|
||||
meta_PS2_P2BT, /* Pop'n'Music 7 Audio File */
|
||||
meta_PS2_GBTS, /* Pop'n'Music 9 Audio File */
|
||||
meta_NGC_DSP_IADP, /* Gamecube Interleave DSP */
|
||||
meta_PS2_TK5, /* Tekken 5 Stream Files */
|
||||
meta_PS2_MCG, /* Gunvari MCG Files (was name .GCM on disk) */
|
||||
meta_ZSD, /* Dragon Booster ZSD */
|
||||
meta_REDSPARK, /* "RedSpark" RSD (MadWorld) */
|
||||
@ -470,7 +469,6 @@ typedef enum {
|
||||
meta_PS2_MSA, /* Psyvariar -Complete Edition- */
|
||||
meta_PS2_VOI, /* RAW Danger (Zettaizetsumei Toshi 2 - Itetsuita Kiokutachi) [PS2] */
|
||||
meta_P3D, /* Prototype P3D */
|
||||
meta_PS2_TK1, /* Tekken (NamCollection) */
|
||||
meta_NGC_RKV, /* Legacy of Kain - Blood Omen 2 (GC) */
|
||||
meta_DSP_DDSP, /* Various (2 dsp files stuck together */
|
||||
meta_NGC_DSP_MPDS, /* Big Air Freestyle, Terminator 3 */
|
||||
|
Loading…
Reference in New Issue
Block a user