mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 06:15:43 +00:00
7f90ed61c6
The BufferedAudioStream buffers the data it gets through the Write() calls and what is consumed by the callback. This means that if the audio producer starts Write()ing data right after Start()ing the stream, data will accumulate in this buffer and won't be consumed. Eventually, the buffer will be of a certain size before it begins to be consumed by the callback, and this means an umcompressible latency (because the data will be written at more or less the same rate as it is produced). This patch start the BufferedAudioStream right away when it is created, dropping the silent AudioSegment until it finds real data (and padding with silence is then done at the beginning). The stream will underrun, but the callback will synthetize silence, avoiding overbuffering in the BufferedAudioStream. This ensures minimal latency cause by the buffering. Note that the clock will still advance, so this will not change the behavior of content that has leading silence. |
||
---|---|---|
.. | ||
base | ||
canvas | ||
events | ||
html | ||
mathml/content | ||
media | ||
smil | ||
svg | ||
test | ||
xbl | ||
xml | ||
xslt | ||
xul | ||
moz.build |