mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-23 05:32:42 -04:00
DuskDsp: Fix streamed audio position tracking
This commit is contained in:
@@ -457,10 +457,7 @@ static int ReadChannelSamplesChunk(
|
||||
|
||||
auto aramBase = static_cast<u8*>(ARGetStorageAddress()) + channel.mWaveAramAddress;
|
||||
|
||||
// Streaming logic directly modifies mSamplesLeft.
|
||||
// So we use that as our tracking of where we are.
|
||||
auto curSamplePosition = channel.mEndSample - channel.mSamplesLeft;
|
||||
|
||||
auto curSamplePosition = channel.mSamplePosition;
|
||||
u32 skipSamples = curSamplePosition % channel.mSamplesPerBlock;
|
||||
if (skipSamples != 0) {
|
||||
// We need to start reading in the middle of a block. This can happen thanks to loops.
|
||||
|
||||
Reference in New Issue
Block a user