Rename some blocked layouts for clarity

This commit is contained in:
bnnm 2018-02-25 16:52:57 +01:00
parent c7173a6df5
commit c44b7ef264
11 changed files with 29 additions and 33 deletions

View File

@ -567,13 +567,13 @@ static const layout_info layout_info_list[] = {
{layout_thp_blocked, "THP Movie Audio blocked"},
{layout_filp_blocked, "FILp blocked"},
{layout_blocked_ea_swvr, "blocked (EA SWVR)"},
{layout_ps2_adm_blocked, "ADM blocked"},
{layout_blocked_adm, "blocked (ADM)"},
{layout_dsp_bdsp_blocked, "DSP blocked"},
{layout_blocked_ivaud, "blocked (IVAUD)"},
{layout_ps2_iab_blocked, "IAB blocked"},
{layout_ps2_strlr_blocked, "The Bouncer STR blocked"},
{layout_rws_blocked, "RWS blocked"},
{layout_hwas_blocked, "HWAS blocked"},
{layout_blocked_rws, "blocked (RWS)"},
{layout_blocked_hwas, "blocked (HWAS)"},
{layout_tra_blocked, "TRA blocked"},
{layout_acm, "ACM blocked"},
{layout_mus_acm, "multiple ACM files, ACM blocked"},

View File

@ -131,8 +131,8 @@ void render_vgmstream_blocked(sample * buffer, int32_t sample_count, VGMSTREAM *
case layout_blocked_ea_swvr:
block_update_ea_swvr(vgmstream->next_block_offset,vgmstream);
break;
case layout_ps2_adm_blocked:
ps2_adm_block_update(vgmstream->next_block_offset,vgmstream);
case layout_blocked_adm:
block_update_adm(vgmstream->next_block_offset,vgmstream);
break;
case layout_dsp_bdsp_blocked:
dsp_bdsp_block_update(vgmstream->next_block_offset,vgmstream);
@ -146,11 +146,11 @@ void render_vgmstream_blocked(sample * buffer, int32_t sample_count, VGMSTREAM *
case layout_ps2_strlr_blocked:
ps2_strlr_block_update(vgmstream->next_block_offset,vgmstream);
break;
case layout_rws_blocked:
rws_block_update(vgmstream->next_block_offset,vgmstream);
case layout_blocked_rws:
block_update_rws(vgmstream->next_block_offset,vgmstream);
break;
case layout_hwas_blocked:
hwas_block_update(vgmstream->next_block_offset,vgmstream);
case layout_blocked_hwas:
block_update_hwas(vgmstream->next_block_offset,vgmstream);
break;
case layout_blocked_ea_sns:
block_update_ea_sns(vgmstream->next_block_offset,vgmstream);

View File

@ -2,7 +2,7 @@
#include "../vgmstream.h"
/* a simple headerless block with special adpcm history handling */
void hwas_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
void block_update_hwas(off_t block_offset, VGMSTREAM * vgmstream) {
int i;
size_t block_size;

View File

@ -45,10 +45,8 @@ void thp_block_update(off_t block_offset, VGMSTREAM * vgmstream);
void filp_block_update(off_t block_offset, VGMSTREAM * vgmstream);
void block_update_ivaud(off_t block_offset, VGMSTREAM * vgmstream);
void block_update_ea_swvr(off_t block_offset, VGMSTREAM * vgmstream);
void ps2_adm_block_update(off_t block_offset, VGMSTREAM * vgmstream);
void block_update_adm(off_t block_offset, VGMSTREAM * vgmstream);
void dsp_bdsp_block_update(off_t block_offset, VGMSTREAM * vgmstream);
@ -58,10 +56,8 @@ void ps2_iab_block_update(off_t block_offset, VGMSTREAM * vgmstream);
void ps2_strlr_block_update(off_t block_offset, VGMSTREAM * vgmstream);
void rws_block_update(off_t block_offset, VGMSTREAM * vgmstream);
void hwas_block_update(off_t block_offset, VGMSTREAM * vgmstream);
void block_update_rws(off_t block_offset, VGMSTREAM * vgmstream);
void block_update_hwas(off_t block_offset, VGMSTREAM * vgmstream);
void block_update_ea_sns(off_t block_offset, VGMSTREAM * vgmstream);
void block_update_awc(off_t block_offset, VGMSTREAM * vgmstream);
void block_update_vgs(off_t block_offset, VGMSTREAM * vgmstream);

View File

@ -2,7 +2,7 @@
#include "../vgmstream.h"
/* blocks of 0x1000 with interleave 0x400 but also smaller last interleave */
void ps2_adm_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
void block_update_adm(off_t block_offset, VGMSTREAM * vgmstream) {
STREAMFILE* streamFile = vgmstream->ch[0].streamfile;
int i, new_full_block;
size_t block_size, interleave_size, interleave_data;

View File

@ -2,7 +2,7 @@
#include "../vgmstream.h"
/* a simple headerless block with padding; configured in the main header */
void rws_block_update(off_t block_offset, VGMSTREAM * vgmstream) {
void block_update_rws(off_t block_offset, VGMSTREAM * vgmstream) {
int i;
size_t block_size;
size_t interleave;

View File

@ -34,14 +34,14 @@ VGMSTREAM * init_vgmstream_nds_hwas(STREAMFILE *streamFile) {
vgmstream->meta_type = meta_NDS_HWAS;
vgmstream->coding_type = coding_IMA_int;
vgmstream->layout_type = layout_hwas_blocked;
vgmstream->layout_type = layout_blocked_hwas;
vgmstream->full_block_size = read_32bitLE(0x04,streamFile); /* usually 0x2000, 0x4000 or 0x8000 */
/* open the file for reading by each channel */
if (!vgmstream_open_stream(vgmstream,streamFile,start_offset))
goto fail;
hwas_block_update(start_offset, vgmstream);
block_update_hwas(start_offset, vgmstream);
return vgmstream;

View File

@ -36,21 +36,21 @@ VGMSTREAM * init_vgmstream_ps2_adm(STREAMFILE *streamFile) {
vgmstream->meta_type = meta_PS2_ADM;
vgmstream->coding_type = coding_PSX;
vgmstream->layout_type = layout_ps2_adm_blocked;
vgmstream->layout_type = layout_blocked_adm;
if (!vgmstream_open_stream(vgmstream,streamFile,start_offset))
goto fail;
/* calc num_samples as playable data size varies between files/blocks */
vgmstream->num_samples = 0; //ps_bytes_to_samples(get_streamfile_size(streamFile), channel_count);
ps2_adm_block_update(start_offset,vgmstream);
block_update_adm(start_offset,vgmstream);
while (vgmstream->next_block_offset < get_streamfile_size(streamFile)) {
if (loop_flag && vgmstream->current_block_offset == loop_start_offset)
vgmstream->loop_start_sample = vgmstream->num_samples;
vgmstream->num_samples += ps_bytes_to_samples(vgmstream->current_block_size * channel_count, channel_count);
ps2_adm_block_update(vgmstream->next_block_offset,vgmstream);
block_update_adm(vgmstream->next_block_offset,vgmstream);
}
@ -58,7 +58,7 @@ VGMSTREAM * init_vgmstream_ps2_adm(STREAMFILE *streamFile) {
vgmstream->loop_end_sample = vgmstream->num_samples;
ps2_adm_block_update(start_offset,vgmstream);
block_update_adm(start_offset,vgmstream);
return vgmstream;
fail:

View File

@ -155,7 +155,7 @@ VGMSTREAM * init_vgmstream_rws(STREAMFILE *streamFile) {
if (name_offset)
read_string(vgmstream->stream_name,STREAM_NAME_SIZE, name_offset,streamFile);
vgmstream->layout_type = layout_rws_blocked;
vgmstream->layout_type = layout_blocked_rws;
vgmstream->current_block_size = block_size / vgmstream->channels;
vgmstream->full_block_size = block_size_total;
@ -207,7 +207,7 @@ VGMSTREAM * init_vgmstream_rws(STREAMFILE *streamFile) {
if (!vgmstream_open_stream(vgmstream,streamFile,start_offset))
goto fail;
rws_block_update(start_offset, vgmstream); /* block init */
block_update_rws(start_offset, vgmstream); /* block init */
return vgmstream;

View File

@ -970,13 +970,13 @@ void render_vgmstream(sample * buffer, int32_t sample_count, VGMSTREAM * vgmstre
case layout_filp_blocked:
case layout_blocked_ivaud:
case layout_blocked_ea_swvr:
case layout_ps2_adm_blocked:
case layout_blocked_adm:
case layout_dsp_bdsp_blocked:
case layout_tra_blocked:
case layout_ps2_iab_blocked:
case layout_ps2_strlr_blocked:
case layout_rws_blocked:
case layout_hwas_blocked:
case layout_blocked_rws:
case layout_blocked_hwas:
case layout_blocked_ea_sns:
case layout_blocked_awc:
case layout_blocked_vgs:

View File

@ -239,15 +239,15 @@ typedef enum {
layout_thp_blocked,
layout_filp_blocked,
layout_blocked_ea_swvr,
layout_ps2_adm_blocked,
layout_blocked_adm,
layout_dsp_bdsp_blocked,
layout_mxch_blocked,
layout_blocked_ivaud, /* GTA IV .ivaud blocks */
layout_tra_blocked, /* DefJam Rapstar .tra blocks */
layout_ps2_iab_blocked,
layout_ps2_strlr_blocked,
layout_rws_blocked,
layout_hwas_blocked,
layout_blocked_rws,
layout_blocked_hwas,
layout_blocked_ea_sns, /* newest Electronic Arts blocks, found in SNS/SNU/SPS/etc formats */
layout_blocked_awc, /* Rockstar AWC */
layout_blocked_vgs, /* Guitar Hero II (PS2) */