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-21 01:20:03 +00:00
Родитель de4e7c9e01
Коммит d48dc046b9
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

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