mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-05 03:50:07 +00:00
FLAC/OGG: Fix a bug in buffered reads
This commit is contained in:
parent
cb2efe5d59
commit
156d8c7058
2 changed files with 4 additions and 2 deletions
|
|
@ -274,7 +274,8 @@ public:
|
|||
if (! remainingSamples.isEmpty())
|
||||
for (int i = numDestChannels; --i >= 0;)
|
||||
if (destSamples[i] != nullptr)
|
||||
zeromem (destSamples[i] + startOffsetInDestBuffer, (size_t) remainingSamples.getLength() * sizeof (int));
|
||||
zeromem (destSamples[i] + startOffsetInDestBuffer + (remainingSamples.getStart() - startSampleInFile),
|
||||
(size_t) remainingSamples.getLength() * sizeof (int));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -216,7 +216,8 @@ public:
|
|||
if (! remainingSamples.isEmpty())
|
||||
for (int i = numDestChannels; --i >= 0;)
|
||||
if (destSamples[i] != nullptr)
|
||||
zeromem (destSamples[i] + startOffsetInDestBuffer, (size_t) remainingSamples.getLength() * sizeof (int));
|
||||
zeromem (destSamples[i] + startOffsetInDestBuffer + (remainingSamples.getStart() - startSampleInFile),
|
||||
(size_t) remainingSamples.getLength() * sizeof (int));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue