mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
b=890528 delay buffer must be greater than max delay frames to avoid reading what has just been written r=ehsan
--HG-- extra : transplant_source : %86L%3C%C2%F0%A79%E4w%F6u%FD%11d%A9%FCu%F90%E8
This commit is contained in:
parent
88ea5a6a50
commit
eb237f5e62
@ -109,7 +109,10 @@ DelayProcessor::EnsureBuffer(uint32_t aNumberOfChannels)
|
||||
if (!mBuffer.SetLength(aNumberOfChannels)) {
|
||||
return false;
|
||||
}
|
||||
const int numFrames = mMaxDelayFrames;
|
||||
// The length of the buffer is one greater than the maximum delay so that
|
||||
// writing an input frame does not overwrite the frame that would
|
||||
// subsequently be read at maximum delay.
|
||||
const int numFrames = mMaxDelayFrames + 1;
|
||||
for (uint32_t channel = 0; channel < aNumberOfChannels; ++channel) {
|
||||
if (!mBuffer[channel].SetLength(numFrames)) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user