diff --git a/src/formats.c b/src/formats.c index 820d0439..0395c1b1 100644 --- a/src/formats.c +++ b/src/formats.c @@ -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"}, diff --git a/src/layout/blocked.c b/src/layout/blocked.c index b6b1530f..b910cd9d 100644 --- a/src/layout/blocked.c +++ b/src/layout/blocked.c @@ -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); diff --git a/src/layout/hwas_blocked.c b/src/layout/hwas_blocked.c index f55a40fc..dbd4fd70 100644 --- a/src/layout/hwas_blocked.c +++ b/src/layout/hwas_blocked.c @@ -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; diff --git a/src/layout/layout.h b/src/layout/layout.h index 466281ef..41ba7735 100644 --- a/src/layout/layout.h +++ b/src/layout/layout.h @@ -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); diff --git a/src/layout/ps2_adm_blocked.c b/src/layout/ps2_adm_blocked.c index b9b9bf5c..867535a1 100644 --- a/src/layout/ps2_adm_blocked.c +++ b/src/layout/ps2_adm_blocked.c @@ -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; diff --git a/src/layout/rws_blocked.c b/src/layout/rws_blocked.c index 23b90c53..7d3fee2a 100644 --- a/src/layout/rws_blocked.c +++ b/src/layout/rws_blocked.c @@ -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; diff --git a/src/meta/nds_hwas.c b/src/meta/nds_hwas.c index e50e614e..9c9449c1 100644 --- a/src/meta/nds_hwas.c +++ b/src/meta/nds_hwas.c @@ -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; diff --git a/src/meta/ps2_adm.c b/src/meta/ps2_adm.c index 71041c6a..cd23625f 100644 --- a/src/meta/ps2_adm.c +++ b/src/meta/ps2_adm.c @@ -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: diff --git a/src/meta/rws.c b/src/meta/rws.c index 0f4796f1..c4089875 100644 --- a/src/meta/rws.c +++ b/src/meta/rws.c @@ -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; diff --git a/src/vgmstream.c b/src/vgmstream.c index b7c7ed5e..463f1e09 100644 --- a/src/vgmstream.c +++ b/src/vgmstream.c @@ -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: diff --git a/src/vgmstream.h b/src/vgmstream.h index 7dab48de..5121be79 100644 --- a/src/vgmstream.h +++ b/src/vgmstream.h @@ -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) */