mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
9edc44ff65
This prevent a bug where the graph would be using a SystemClockDriver even if it was rendering Web Audio API content. It went like this: - An AudioContext was created. - Some AudioNodeStream (Web Audio API MediaStreams) were created, but their MediaStreamTrack was not added yet - During the stream ordering, we would see that we were running an AudioCallbackDriver (because the MSG was created using an AudioContext, and we pass in hints regarding the type of MediaStreams that will be added in the future, to open the audio stream as early as we can, because it can take some time, the MSG was created directly using an AudioCallbackDriver) - Also during the stream ordering, we see that none of our MediaStream have an MediaStreamTrack with an audio track. This triggers a switch to a SystemClockDriver, because the graph thinks there is no audio. - During CreateAndDestroyAudioNode, we would not switch to an AudioCallbackDriver on the first iteration (right after the UpdateStreamOrder call), because we would be switching, and not during the iteration after, because we thought we already switched (the first patch makes this more robust). This basically forces an AudioCallbackDriver if there is an AudioNodeStream, which prevents unnecessary GraphDriver switches (and save threads creation destruction, audio stream create and destruction, and all other resources associated with a GraphDriver). |
||
---|---|---|
.. | ||
base | ||
html | ||
media | ||
svg | ||
test | ||
xul | ||
moz.build |