DescriptionFix race in audio playback.
This is a race condition that gets triggered if we get *both* audible and
inaudible directives in the same instruction. This causes us to encode both
the tokens, but when ProcessNextTransmit gets called after the samples for the
first token are received, it tries to play the other type of token also (for
which samples may not have been received yet). The simplest way to fix it is
adding a HasKey check to the cache for both types of tokens. We will get
called after each of the samples tokens are added to their respective caches,
so if we skip playing one particular type of token (since it hasn't landed in
its cache yet), we will get called again after it gets added to its cache, so
both the tokens will definitely play.
R=xiyuan@chromium.org
BUG=419585
Committed: https://crrev.com/60cbacb9f8741c70fdf4212a5e954f7df489196c
Cr-Commit-Position: refs/heads/master@{#297844}
Patch Set 1 #
Messages
Total messages: 6 (1 generated)
|