mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-17 23:36:41 +01:00
Fix mono 3DS Ubi RAKI .ckd
This commit is contained in:
parent
817e9c2e1d
commit
357f876132
@ -139,7 +139,8 @@ VGMSTREAM * init_vgmstream_ubi_raki(STREAMFILE *streamFile) {
|
||||
vgmstream->interleave_block_size = 0x8;
|
||||
|
||||
/* reading could be improved but should work with some luck since most values are semi-fixed */
|
||||
{
|
||||
if (channel_count > 1) {
|
||||
/* find "dspL" pointing to "CWAV" header and read coefs (separate from data at start_offset) */
|
||||
off_t chunk_offset = offset+ 0x20 + 0xc; /* after "fmt" */
|
||||
while (chunk_offset < header_size) {
|
||||
if (read_32bitBE(chunk_offset,streamFile) == 0x6473704C) { /* "dspL" found */
|
||||
@ -152,6 +153,12 @@ VGMSTREAM * init_vgmstream_ubi_raki(STREAMFILE *streamFile) {
|
||||
chunk_offset += 0xc;
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* CWAV at start (a full CWAV, unlike the above) */
|
||||
dsp_read_coefs(vgmstream,streamFile, start_offset + 0x7c, 0x00, big_endian);
|
||||
start_offset += 0xE0;
|
||||
data_size = get_streamfile_size(streamFile) - start_offset;
|
||||
}
|
||||
|
||||
vgmstream->num_samples = dsp_bytes_to_samples(data_size, channel_count);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user