cleanup: rename s14_sss.c to raw_s14_sss.c

This commit is contained in:
bnnm 2023-06-24 16:36:54 +02:00
parent a5b4103a10
commit 543ff1d953
5 changed files with 22 additions and 21 deletions

View File

@ -1164,7 +1164,7 @@ static const meta_info meta_info_list[] = {
{meta_WII_BNS, "Nintendo BNS header"},
{meta_WII_WAS, "Sumo Digital iSWS header"},
{meta_XBOX_HLWAV, "Half-Life 2 .WAV header"},
{meta_MYSPD, "U-Sing .MYSPD header"},
{meta_MYSPD, "Punchers Impact .MYSPD header"},
{meta_HIS, "Her Interactive HIS header"},
{meta_AST_MV, "MicroVision AST header"},
{meta_AST_MMV, "Marvelous AST header"},

View File

@ -444,7 +444,7 @@ VGMSTREAM * init_vgmstream_bnsf(STREAMFILE* streamFile);
VGMSTREAM * init_vgmstream_ps2_wb(STREAMFILE* streamFile);
VGMSTREAM * init_vgmstream_s14_sss(STREAMFILE* streamFile);
VGMSTREAM* init_vgmstream_raw_s14_sss(STREAMFILE* sf);
VGMSTREAM * init_vgmstream_ps2_gcm(STREAMFILE* streamFile);

View File

@ -1,38 +1,39 @@
#include "meta.h"
#include "../coding/coding.h"
/* .MYSPF - from U-Sing (Wii) */
VGMSTREAM * init_vgmstream_myspd(STREAMFILE *streamFile) {
VGMSTREAM * vgmstream = NULL;
int loop_flag = 0, channel_count;
off_t start_offset;
size_t channel_size;
/* check extension, case insensitive */
if (!check_extensions(streamFile,"myspd"))
goto fail;
/* .MYSPD - from U-Sing (Wii) */
VGMSTREAM* init_vgmstream_myspd(STREAMFILE* sf) {
VGMSTREAM* vgmstream = NULL;
int loop_flag = 0, channels;
uint32_t start_offset, channel_size;
channel_count = 2;
/* checks */
/* .myspd: actual extension */
if (!check_extensions(sf,"myspd"))
return NULL;
channels = 2;
start_offset = 0x20;
channel_size = read_32bitBE(0x00,streamFile);
channel_size = read_s32be(0x00,sf);
/* check size */
if ((channel_size * channel_count + start_offset) != get_streamfile_size(streamFile))
if (channel_size * channels + start_offset != get_streamfile_size(sf))
goto fail;
/* build the VGMSTREAM */
vgmstream = allocate_vgmstream(channel_count,loop_flag);
vgmstream = allocate_vgmstream(channels,loop_flag);
if (!vgmstream) goto fail;
vgmstream->num_samples = ima_bytes_to_samples(channel_size*channel_count, channel_count);
vgmstream->sample_rate = read_32bitBE(0x04,streamFile);
vgmstream->num_samples = ima_bytes_to_samples(channel_size*channels, channels);
vgmstream->sample_rate = read_s32be(0x04,sf);
vgmstream->meta_type = meta_MYSPD;
vgmstream->coding_type = coding_IMA_int;
vgmstream->layout_type = layout_interleave;
vgmstream->interleave_block_size = channel_size;
if (!vgmstream_open_stream(vgmstream,streamFile,start_offset))
if (!vgmstream_open_stream(vgmstream,sf,start_offset))
goto fail;
return vgmstream;

View File

@ -6,7 +6,7 @@
static int test_interleave(STREAMFILE* sf, int channels, int interleave);
/* .s14/.sss - headerless siren14 stream [The Idolm@ster (DS), Korogashi Puzzle Katamari Damacy (DS), Taiko no Tatsujin DS 1/2 (DS)] */
VGMSTREAM* init_vgmstream_s14_sss(STREAMFILE* sf) {
VGMSTREAM* init_vgmstream_raw_s14_sss(STREAMFILE* sf) {
VGMSTREAM* vgmstream = NULL;
off_t start_offset = 0;
int channels, loop_flag = 0, interleave;
@ -18,7 +18,7 @@ VGMSTREAM* init_vgmstream_s14_sss(STREAMFILE* sf) {
} else if (check_extensions(sf,"s14")) {
channels = 1; /* may have dual _0ch.s14 + _1ch.s14, needs .txtp */
} else {
goto fail;
return NULL;
}
/* raw siren comes in 3 frame sizes, try to guess the correct one */

View File

@ -552,7 +552,7 @@ init_vgmstream_t init_vgmstream_functions[] = {
init_vgmstream_raw_snds, /* .snds raw SNDS IMA */
init_vgmstream_raw_wavm, /* .wavm raw xbox */
init_vgmstream_raw_pcm, /* .raw raw PCM */
init_vgmstream_s14_sss, /* .s14/sss raw siren14 */
init_vgmstream_raw_s14_sss, /* .s14/sss raw siren14 */
init_vgmstream_exakt_sc, /* .sc raw PCM */
init_vgmstream_zwdsp, /* fake format */
init_vgmstream_ps2_adm, /* weird non-constant PSX blocks */