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:
Karl Tomlinson 2013-09-02 12:59:34 +12:00
parent 88ea5a6a50
commit eb237f5e62

View File

@ -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;