gecko-dev/content
Paul Adenot 7f90ed61c6 Bug 919215 - Start the AudioStream on creation when in low-latency mode, and let it underrun. r=roc
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.
2013-11-19 10:43:15 +13:00
..
base Bug 939632 - Remove LIBRARY_NAME for leaf libraries. r=gps 2013-11-19 11:50:54 +09:00
canvas Bug 939632 - Remove LIBRARY_NAME for leaf libraries. r=gps 2013-11-19 11:50:54 +09:00
events Bug 939632 - Remove LIBRARY_NAME for leaf libraries. r=gps 2013-11-19 11:50:54 +09:00
html Bug 939632 - Remove LIBRARY_NAME for leaf libraries. r=gps 2013-11-19 11:50:54 +09:00
mathml/content Bug 939632 - Remove LIBRARY_NAME for leaf libraries. r=gps 2013-11-19 11:50:54 +09:00
media Bug 919215 - Start the AudioStream on creation when in low-latency mode, and let it underrun. r=roc 2013-11-19 10:43:15 +13:00
smil Bug 939632 - Remove LIBRARY_NAME for leaf libraries. r=gps 2013-11-19 11:50:54 +09:00
svg Bug 939632 - Remove LIBRARY_NAME for leaf libraries. r=gps 2013-11-19 11:50:54 +09:00
test Bug 939044 - Remove most definitions of MODULE. r=mshal 2013-11-19 11:47:39 +09:00
xbl Bug 939632 - Remove LIBRARY_NAME for leaf libraries. r=gps 2013-11-19 11:50:54 +09:00
xml Bug 939632 - Remove LIBRARY_NAME for leaf libraries. r=gps 2013-11-19 11:50:54 +09:00
xslt Bug 939632 - Remove LIBRARY_NAME for leaf libraries. r=gps 2013-11-19 11:50:54 +09:00
xul Bug 939632 - Remove LIBRARY_NAME for leaf libraries. r=gps 2013-11-19 11:50:54 +09:00
moz.build Bug 939044 - Remove most definitions of MODULE. r=mshal 2013-11-19 11:47:39 +09:00