Chromium Code Reviews
DescriptionStop enqueueing data to output audio device if consecutive empty buffers are received
The current android implementation of WebAudio is not power friendly.
It holds the AudioMix wakelock, and causes a lot of battery consumption even if tab is backgrounded.
When an AudioContext is created, WebAudio will start enqueueing data to the output device.
This happens even when no data is decoded or no audio buffer is appended.
This CL let the OpenSLES player enter an idle mode when consecutive empty buffers are received.
In the idle mode, the player will no longer enqueue data to the output device.
It regularly check the received data and exits the idle mode if non-empty data are encountered.
The intervals to check the data is calculated by the consumption time of the last received audio.
This may introduce some drifting issues, but that's not as serious as the power consumption issue.
BUG=470153
Patch Set 1 #
Messages
Total messages: 14 (1 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||