From 8b4bf139b305895e4f9d8269a8500545686da978 Mon Sep 17 00:00:00 2001 From: bnnm Date: Thu, 22 Sep 2022 23:17:20 +0200 Subject: [PATCH] Fix some .ccc --- src/formats.c | 2 +- src/meta/ps2_ccc.c | 4 ++-- src/vgmstream.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/formats.c b/src/formats.c index 97c88ea8..5520ba36 100644 --- a/src/formats.c +++ b/src/formats.c @@ -130,7 +130,7 @@ static const char* extension_list[] = { "caf", "cbd2", - "ccc", + "ccc", //fake extension (to be removed) "cd", "cfn", //fake extension for CAF (renamed, to be removed?) "chd", //txth/reserved [Donkey Konga (GC), Star Fox Assault (GC)] diff --git a/src/meta/ps2_ccc.c b/src/meta/ps2_ccc.c index ab2a4013..d0745a66 100644 --- a/src/meta/ps2_ccc.c +++ b/src/meta/ps2_ccc.c @@ -33,10 +33,10 @@ VGMSTREAM * init_vgmstream_ps2_ccc(STREAMFILE *streamFile) { vgmstream->channels = channel_count; vgmstream->sample_rate = read_32bitLE(0x04,streamFile); vgmstream->coding_type = coding_PSX; - vgmstream->num_samples = (read_32bitLE(0x08,streamFile))/channel_count/32*28; + vgmstream->num_samples = (read_32bitLE(0x08,streamFile))/channel_count/0x10*28; if (loop_flag) { vgmstream->loop_start_sample = 0; - vgmstream->loop_end_sample = (read_32bitLE(0x08,streamFile))/channel_count/32*28; + vgmstream->loop_end_sample = (read_32bitLE(0x08,streamFile))/channel_count/0x10*28; } vgmstream->layout_type = layout_interleave; diff --git a/src/vgmstream.c b/src/vgmstream.c index 53c0d061..14974ac6 100644 --- a/src/vgmstream.c +++ b/src/vgmstream.c @@ -129,7 +129,6 @@ VGMSTREAM* (*init_vgmstream_functions[])(STREAMFILE* sf) = { init_vgmstream_idsp_ie, init_vgmstream_ngc_ymf, init_vgmstream_sadl, - init_vgmstream_ps2_ccc, init_vgmstream_fag, init_vgmstream_ps2_mihb, init_vgmstream_ngc_pdt_split, @@ -555,6 +554,7 @@ VGMSTREAM* (*init_vgmstream_functions[])(STREAMFILE* sf) = { init_vgmstream_ngc_ulw, /* .ulw raw u-Law */ init_vgmstream_exakt_sc, /* .sc raw PCM */ init_vgmstream_zwdsp, /* fake format */ + init_vgmstream_ps2_ccc, /* fake format, to be removed */ init_vgmstream_ps2_adm, /* weird non-constant PSX blocks */ init_vgmstream_baf_badrip, /* crap, to be removed */ init_vgmstream_rxws_badrip, /* crap, to be removed */