Bug 1605134 - Assert that the output buffer was filled during the callback. r=padenot

Filling the output buffer, even if only with silence, is needed for the audio
driver to iterate with the right number of frames. This patch makes sure the
graph always does this.

Differential Revision: https://phabricator.services.mozilla.com/D97406
This commit is contained in:
Andreas Pehrson 2020-11-30 14:16:25 +00:00
parent f5f882a39b
commit aa712230cd

View File

@ -966,6 +966,9 @@ long AudioCallbackDriver::DataCallback(const AudioDataValue* aInputBuffer,
result = IterationResult::CreateStillProcessing(); result = IterationResult::CreateStillProcessing();
} }
MOZ_ASSERT(mBuffer.Available() == 0,
"The graph should have filled the buffer");
mBuffer.BufferFilled(); mBuffer.BufferFilled();
#ifdef MOZ_SAMPLE_TYPE_FLOAT32 #ifdef MOZ_SAMPLE_TYPE_FLOAT32