Local output from a MediaTrackGraph can come from either a media element or an AudioContext. Currently, non-default outputs can only be set from the media element, but this will be required on AudioContext for recent spec changes. Our current echo cancellation mechanism is intended only for use when the input/output pair is on the [same graph](https://searchfox.org/mozilla-central/source/dom/media/webrtc/MediaEngineWebRTCAudio.cpp#1242) and (so) [same thread](https://searchfox.org/mozilla-central/rev/1f5d04fed3631f97a84b589429419b83342d7c9a/dom/media/webrtc/MediaEngineWebRTCAudio.h#110-111,113). The underlying `AudioProcessing` class does have the [necessary locking to be used with input and output on different threads](https://searchfox.org/mozilla-central/rev/1f5d04fed3631f97a84b589429419b83342d7c9a/third_party/libwebrtc/modules/audio_processing/include/audio_processing.h#75-81). So we could plausibly have an n * m matrix of `AudioProcessing`, but we don't need this in the common case.
Bug 1849108 Comment 5 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Local output from a MediaTrackGraph can come from either a media element or an AudioContext. Currently, non-default outputs can only be set from the media element, but this will be required on AudioContext for recent spec changes. Our current echo cancellation mechanism is intended only for use when the input/output pair is on the [same graph](https://searchfox.org/mozilla-central/rev/1f5d04fed3631f97a84b589429419b83342d7c9a/dom/media/webrtc/MediaEngineWebRTCAudio.cpp#1242) and (so) [same thread](https://searchfox.org/mozilla-central/rev/1f5d04fed3631f97a84b589429419b83342d7c9a/dom/media/webrtc/MediaEngineWebRTCAudio.h#110-111,113). The underlying `AudioProcessing` class does have the [necessary locking to be used with input and output on different threads](https://searchfox.org/mozilla-central/rev/1f5d04fed3631f97a84b589429419b83342d7c9a/third_party/libwebrtc/modules/audio_processing/include/audio_processing.h#75-81). So we could plausibly have an n * m matrix of `AudioProcessing`, but we don't need this in the common case.