From a6c59fdd076157d1e083fff1b150fe1eeb9386c5 Mon Sep 17 00:00:00 2001 From: bnnm Date: Sat, 21 Jan 2023 18:37:52 +0100 Subject: [PATCH] remove raw .tra (use .txth) --- src/formats.c | 2 -- src/layout/blocked.c | 3 -- src/layout/blocked_tra.c | 17 ----------- src/layout/layout.h | 1 - src/meta/meta.h | 2 -- src/meta/x360_tra.c | 61 ---------------------------------------- src/render.c | 1 - src/vgmstream.c | 1 - src/vgmstream.h | 2 -- 9 files changed, 90 deletions(-) delete mode 100644 src/layout/blocked_tra.c delete mode 100644 src/meta/x360_tra.c diff --git a/src/formats.c b/src/formats.c index 257b8e12..9dc6f6f3 100644 --- a/src/formats.c +++ b/src/formats.c @@ -934,7 +934,6 @@ static const layout_info layout_info_list[] = { {layout_blocked_vs_str, "blocked (STR VS)"}, {layout_blocked_rws, "blocked (RWS)"}, {layout_blocked_hwas, "blocked (HWAS)"}, - {layout_blocked_tra, "blocked (TRA)"}, {layout_blocked_ea_sns, "blocked (EA SNS)"}, {layout_blocked_awc, "blocked (AWC)"}, {layout_blocked_vgs, "blocked (VGS)"}, @@ -1199,7 +1198,6 @@ static const meta_info meta_info_list[] = { {meta_SGXD, "Sony SGXD header"}, {meta_WII_RAS, "RAS header"}, {meta_SPM, "Square SPM header"}, - {meta_X360_TRA, "Terminal Reality .TRA raw header"}, {meta_VGS_PS, "Princess Soft VGS header"}, {meta_PS2_IAB, "Runtime .IAB header"}, {meta_VS_STR, "Square .VS STR* header"}, diff --git a/src/layout/blocked.c b/src/layout/blocked.c index dff0e496..395af40e 100644 --- a/src/layout/blocked.c +++ b/src/layout/blocked.c @@ -159,9 +159,6 @@ void block_update(off_t block_offset, VGMSTREAM* vgmstream) { case layout_blocked_bdsp: block_update_bdsp(block_offset,vgmstream); break; - case layout_blocked_tra: - block_update_tra(block_offset,vgmstream); - break; case layout_blocked_ps2_iab: block_update_ps2_iab(block_offset,vgmstream); break; diff --git a/src/layout/blocked_tra.c b/src/layout/blocked_tra.c deleted file mode 100644 index db29fe8e..00000000 --- a/src/layout/blocked_tra.c +++ /dev/null @@ -1,17 +0,0 @@ -#include "layout.h" -#include "../vgmstream.h" - -/* set up for the block at the given offset (first 32bytes is useless for decoding) */ -void block_update_tra(off_t block_offset, VGMSTREAM * vgmstream) { - int i; - - vgmstream->current_block_offset = block_offset; - vgmstream->current_block_size = 0x400; - vgmstream->next_block_offset = vgmstream->current_block_offset+vgmstream->current_block_size+8; - vgmstream->current_block_size/=vgmstream->channels; - - for (i=0;ichannels;i++) { - vgmstream->ch[i].offset = vgmstream->current_block_offset+(vgmstream->current_block_size*i)+0x4*(i+1); - - } -} diff --git a/src/layout/layout.h b/src/layout/layout.h index 7accda7e..971143eb 100644 --- a/src/layout/layout.h +++ b/src/layout/layout.h @@ -31,7 +31,6 @@ void block_update_ivaud(off_t block_offset, VGMSTREAM* vgmstream); void block_update_ea_swvr(off_t block_offset, VGMSTREAM* vgmstream); void block_update_adm(off_t block_offset, VGMSTREAM* vgmstream); void block_update_bdsp(off_t block_offset, VGMSTREAM* vgmstream); -void block_update_tra(off_t block_offset, VGMSTREAM* vgmstream); void block_update_ps2_iab(off_t block_offset, VGMSTREAM* vgmstream); void block_update_vs_str(off_t block_offset, VGMSTREAM* vgmstream); void block_update_rws(off_t block_offset, VGMSTREAM* vgmstream); diff --git a/src/meta/meta.h b/src/meta/meta.h index 389ff70b..b5d6d0c3 100644 --- a/src/meta/meta.h +++ b/src/meta/meta.h @@ -503,8 +503,6 @@ VGMSTREAM * init_vgmstream_wii_ras(STREAMFILE* streamFile); VGMSTREAM * init_vgmstream_spm(STREAMFILE* streamFile); -VGMSTREAM * init_vgmstream_x360_tra(STREAMFILE* streamFile); - VGMSTREAM * init_vgmstream_ps2_iab(STREAMFILE* streamFile); VGMSTREAM * init_vgmstream_vs_str(STREAMFILE* streamFile); diff --git a/src/meta/x360_tra.c b/src/meta/x360_tra.c deleted file mode 100644 index d1227a68..00000000 --- a/src/meta/x360_tra.c +++ /dev/null @@ -1,61 +0,0 @@ -#include "meta.h" -#include "../layout/layout.h" -#include "../util.h" - -/* TRA - - TRA is an headerless format which can be found on DefJam Rapstar (X360) - known extensions : WAVM - - 2010-12-03 - Fastelbja : First version ... -*/ -VGMSTREAM * init_vgmstream_x360_tra(STREAMFILE *streamFile) { - VGMSTREAM * vgmstream = NULL; - char filename[PATH_LIMIT]; - - int loop_flag=0; - int channel_count; - int i; - - /* check extension, case insensitive */ - streamFile->get_name(streamFile,filename,sizeof(filename)); - if (strcasecmp("tra",filename_extension(filename))) goto fail; - - /* No loop on wavm */ - loop_flag = 0; - - /* Always stereo files */ - channel_count=2; - - /* build the VGMSTREAM */ - vgmstream = allocate_vgmstream(channel_count,loop_flag); - if (!vgmstream) goto fail; - - /* fill in the vital statistics */ - /* allways 2 channels @ 44100 Hz */ - vgmstream->channels = 2; - vgmstream->sample_rate = 24000; - - vgmstream->coding_type = coding_DVI_IMA_int; - vgmstream->num_samples = (int32_t)(get_streamfile_size(streamFile) - ((get_streamfile_size(streamFile)/0x204)*4)); - vgmstream->layout_type = layout_blocked_tra; - - vgmstream->meta_type = meta_X360_TRA; - - /* open the file for reading by each channel */ - { - for (i=0;ich[i].streamfile = streamFile->open(streamFile,filename,STREAMFILE_DEFAULT_BUFFER_SIZE); - - if (!vgmstream->ch[i].streamfile) goto fail; - } - } - - block_update_tra(0,vgmstream); - return vgmstream; - - /* clean up anything we may have opened */ -fail: - if (vgmstream) close_vgmstream(vgmstream); - return NULL; -} diff --git a/src/render.c b/src/render.c index 6233ec84..06e9af44 100644 --- a/src/render.c +++ b/src/render.c @@ -286,7 +286,6 @@ int render_layout(sample_t* buf, int32_t sample_count, VGMSTREAM* vgmstream) { case layout_blocked_ea_swvr: case layout_blocked_adm: case layout_blocked_bdsp: - case layout_blocked_tra: case layout_blocked_ps2_iab: case layout_blocked_vs_str: case layout_blocked_rws: diff --git a/src/vgmstream.c b/src/vgmstream.c index 1e0630c1..61ce3f77 100644 --- a/src/vgmstream.c +++ b/src/vgmstream.c @@ -239,7 +239,6 @@ VGMSTREAM* (*init_vgmstream_functions[])(STREAMFILE* sf) = { init_vgmstream_sgxd, init_vgmstream_wii_ras, init_vgmstream_spm, - init_vgmstream_x360_tra, init_vgmstream_ps2_iab, init_vgmstream_vs_str, init_vgmstream_lsf_n1nj4n, diff --git a/src/vgmstream.h b/src/vgmstream.h index 9ce9afec..af039365 100644 --- a/src/vgmstream.h +++ b/src/vgmstream.h @@ -260,7 +260,6 @@ typedef enum { layout_blocked_bdsp, layout_blocked_mxch, layout_blocked_ivaud, /* GTA IV .ivaud blocks */ - layout_blocked_tra, /* DefJam Rapstar .tra blocks */ layout_blocked_ps2_iab, layout_blocked_vs_str, layout_blocked_rws, @@ -547,7 +546,6 @@ typedef enum { meta_SGXD, /* Sony: Folklore, Genji, Tokyo Jungle (PS3), Brave Story, Kurohyo (PSP) */ meta_WII_RAS, /* Donkey Kong Country Returns (Wii) */ meta_SPM, - meta_X360_TRA, /* Def Jam Rapstar */ meta_VGS_PS, meta_PS2_IAB, /* Ueki no Housoku - Taosu ze Robert Juudan!! (PS2) */ meta_VS_STR, /* The Bouncer */