With media.getusermedia.microphone.prefer_voice_stream_with_processing.enabled set to false, turn mic input breaks audio output
Categories
(Core :: Audio/Video: Playback, defect)
Tracking
()
People
(Reporter: mstange, Unassigned)
References
Details
Noticed while trying to diagnose bug 2090426:
- On macOS, go to about:config and set
media.getusermedia.microphone.prefer_voice_stream_with_processing.enabledtofalse. - Go to attachment 9676637 [details] and follow the instructions.
Expected results: Audio keeps playing when mic is turned on
Actual results: Audio stops while mic is on
The profile shows that a device keeps getting recreated unsuccessfully: https://share.firefox.dev/4sNI4uC
Comment 1•15 days ago
|
||
| gecko-triage | ||
Thanks for the report and the profile. This is a duplicate of bug 2057748. That bug has the same trigger and the same cause, and it has a patch.
Analysis
When media.getusermedia.microphone.prefer_voice_stream_with_processing.enabled is false, the AudioCallbackDriver constructor in GraphDriver.cpp does not use the VOICE input preference. But MediaTrackGraphImpl::AudioInputDevicePreference() in MediaTrackGraph.cpp still requests a Voice input for any track with input processing, such as echo cancellation. MediaTrackGraphImpl::CheckDriver() sees the mismatch and replaces the driver on each graph iteration. The patch in bug 2057748 makes the graph read the same pref. Bug 2057748 also sets media.getusermedia.audio.processing.platform.enabled to false, but the cause does not depend on that pref.
The profile agrees. While the microphone is open, the GraphRunner thread logs "Switching to new driver" 249 times in about 2.6 seconds. In the parent process, each new duplex stream creates a CoreAudio aggregate device and destroys it soon after. cubeb and CoreAudio report no error. Each new driver runs on its fallback SystemClockDriver first, and the next switch comes before the audio callback takes over. Thus the playback output stays silent until the microphone closes.
If you'd like to provide feedback on this comment, please use the 👍 or 👎 reaction.
Description
•