mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
Bug 1656438 - Report pre-buffer as current buffer size before receiving data in DynamicResampler. r=padenot
Without this patch we return 0, and that can be misinterpreted by AudioDriftCorrection so it thinks we have drifted a lot. This becomes more obvious with a large desired buffer. Differential Revision: https://phabricator.services.mozilla.com/D89759
This commit is contained in:
parent
38e987ad7e
commit
4d7b23d775
@ -455,7 +455,7 @@ void AudioResampler::Update(int aOutRate, int aChannels) {
|
||||
|
||||
int AudioResampler::InputDuration() const {
|
||||
if (!mIsSampleFormatSet) {
|
||||
return 0;
|
||||
return (int)mResampler.mPreBufferFrames;
|
||||
}
|
||||
MOZ_ASSERT((int)mResampler.InFramesBuffered(0) >= 0);
|
||||
return (int)mResampler.InFramesBuffered(0);
|
||||
|
Loading…
Reference in New Issue
Block a user