Finally fixed the noise bug (Use Padded Size instead of normal Size)

This commit is contained in:
2025-12-04 09:44:35 +01:00
parent 7ea0d11d65
commit fb8f275ebb

View File

@@ -164,9 +164,9 @@ CTRFF_API void BCSTM::ReadBlock(PD::u32 block, PD::u8* ref) {
throw std::runtime_error(std::format( throw std::runtime_error(std::format(
"BCSTM: Decode block out of range! ({}/{})", block, GetNumBlocks())); "BCSTM: Decode block out of range! ({}/{})", block, GetNumBlocks()));
} }
pFile.read( pFile.read(reinterpret_cast<char*>(ref),
reinterpret_cast<char*>(ref), (block == (GetNumBlocks() - 1)
(block == (GetNumBlocks() - 1) ? pInfoBlock.StreamInfo.LastSampleBlockSize ? pInfoBlock.StreamInfo.LastSampleBlockPaddedSize
: GetBlockSize())); : GetBlockSize()));
} }