From a02e92757660559cd7faa522206a62c8ae65e14a Mon Sep 17 00:00:00 2001 From: bnnm Date: Sun, 2 Apr 2023 20:31:14 +0200 Subject: [PATCH] Fix some DSP .ckd [Rayman Origins (Wii)] --- src/meta/ubi_ckd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/meta/ubi_ckd.c b/src/meta/ubi_ckd.c index 6f76a4d1..47cf74d5 100644 --- a/src/meta/ubi_ckd.c +++ b/src/meta/ubi_ckd.c @@ -56,6 +56,10 @@ VGMSTREAM* init_vgmstream_ubi_ckd(STREAMFILE* sf) { } else if (find_chunk_be(sf, 0x6461744C,first_offset,0, &chunk_offset,&chunk_size)) { /* "datL" */ /* mono "datL" or full interleave with a "datR" after the "datL" (no check, pretend it exists) */ start_offset = chunk_offset; + + /* chunks follow RIFF's spec of "odd sizes treated as even" [Rayman Origins (Wii)-420_hud~sfx_endofmap_discoloop.wav.ckd] */ + if (chunk_size % 0x02 != 0) + chunk_size += 0x01; data_size = chunk_size * channels; interleave = (0x4+0x4) + chunk_size; /* don't forget to skip the "datR"+size chunk */ } else {