This commit is contained in:
bnnm 2021-10-15 15:21:17 +02:00
parent e1ec116157
commit 3434f3d7f7
2 changed files with 1 additions and 6 deletions

View File

@ -933,7 +933,7 @@ codec = PSX
interleave = @0x10
sample_rate = @0x0A$2 * 48000 / 4096 #pitch value
channels = @0x0D$1
loop_start_sample = @0x0E$1 * interleave / 2 / 0x10 * 28
loop_start_sample = (((@0x0F$1 & 0x7F) * 256) + @0x0E$1) * interleave / channels / 0x10 * 28
loop_flag = @0x0F$1
padding_size = auto-empty

View File

@ -76,19 +76,14 @@ static size_t txth_io_read(STREAMFILE* sf, uint8_t* dest, off_t offset, size_t l
data->block_size = read_u32(data->physical_offset + data->cfg.chunk_size_offset, sf);
data->data_size = data->block_size - data->cfg.chunk_header_size;
VGM_LOG("bs %x = %x\n", data->physical_offset, data->block_size);
/* skip chunk if doesn't match expected header value */
if (data->cfg.chunk_value) {
uint32_t value = read_u32(data->physical_offset + 0x00, sf);
if (value != data->cfg.chunk_value) {
VGM_LOG("skip %x vs %x at %x\n", value, data->cfg.chunk_value, data->physical_offset);
data->data_size = 0;
}
}
else {
VGM_LOG("not skip at %x\n", data->physical_offset) ;
}
}
/* clamp for games where last block is smaller */ //todo not correct for all cases