DescriptionUse multiple shared memory buffers cyclically for audio capture.
Currently, only one buffer of shared memory (10ms) is used to transfer captured audio data from browser process to renderer process. This results in data overwriting on both desktop and mobile, since it gives renderer process only 10ms to pick up the data and renderer process will likely miss reading data in time from time to time due to various reasons, e.g., thread scheduling.
This patch adds a scheme using multiple buffers of shared memory cyclically so that renderer process can have much more time to pick up the data. This can mitigate most data owerwriting cases which happen typically in burst mode. This approach does not introduce any new delay in browser process.
The number of buffers is currently set to 10. It can be set to any positive number and be tuned if needed.
BUG=178040
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=187393
Patch Set 1 #
Total comments: 14
Patch Set 2 : code review #Patch Set 3 : #
Total comments: 1
Patch Set 4 : rebase #
Total comments: 2
Patch Set 5 : aggregate buffers #
Total comments: 10
Patch Set 6 : remove writing segment index to socket #Patch Set 7 : address a missed comment #
Total comments: 28
Patch Set 8 : code review #Patch Set 9 : code review #Messages
Total messages: 22 (0 generated)
|