Fix critical errors were wrong vars were used
This commit is contained in:
@@ -29,13 +29,13 @@ class CTRFF_API BCSTM {
|
|||||||
}
|
}
|
||||||
bool IsLooping() const { return pInfoBlock.StreamInfo.Loop; }
|
bool IsLooping() const { return pInfoBlock.StreamInfo.Loop; }
|
||||||
PD::u32 GetLoopStart() const {
|
PD::u32 GetLoopStart() const {
|
||||||
return pInfoBlock.StreamInfo.LoopStartFrame / GetNumBlocks();
|
return pInfoBlock.StreamInfo.LoopStartFrame / GetBlockSamples();
|
||||||
}
|
}
|
||||||
PD::u32 GetLoopEnd() const {
|
PD::u32 GetLoopEnd() const {
|
||||||
/** Get temp references for better readability */
|
/** Get temp references for better readability */
|
||||||
const PD::u32& loop_end = pInfoBlock.StreamInfo.LoopEndFrame;
|
const PD::u32& loop_end = pInfoBlock.StreamInfo.LoopEndFrame;
|
||||||
const PD::u32& block_samples = GetNumBlocks();
|
const PD::u32& block_samples = GetBlockSamples();
|
||||||
return (loop_end % block_samples ? block_samples
|
return (loop_end % block_samples ? GetNumBlocks()
|
||||||
: loop_end / block_samples);
|
: loop_end / block_samples);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user