DescriptionFixed the racing in the resampler of webrtc when two streams are calling OnData().
There can be multiple streams calling OnData() when the users setup multiple getUserMedia with WebAudio and microphone. We have no way to avoid this situation since it is a valid user cases from the JS perspective.
But unfortunately webrtc does not support it since it has one global transmit mixer, and it will crash when more than 1 stream getting into its resampler.
This CL introduces a lock to sequence the calls to avoid the racing, which should fix the crash.
BUG=332126
TEST=https://devpool-13.talkgadget.google.com/hangouts, go to setting page and play the rington, verify no crash and sound good.
Or go to https://x20web.corp.google.com/~xians/multiple_sources.html, start the call, AddWebAUdio, then Playout a clip, verify the audio sounds good and no crash.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=243902
Patch Set 1 #
Total comments: 6
Patch Set 2 : addressed the comments. #
Messages
Total messages: 11 (0 generated)
|