Commit a1aedbe
committed
Microphone capture can be muted when capturing with and without echo cancellation and using applyConstraints to switch dynamically between the two
rdar://164086015
https://bugs.webkit.org/show_bug.cgi?id=302005
Reviewed by Eric Carlson.
When a web page has two tracks, one with echo cancellation and one without echo cancellation on the same device,
the web page is running two CoreAudioCaptureUnits.
If it renders audio, the VPIO unit may also be rendering audio.
If the VPIO unit is stopping to capture (both tracks go to no echo cancellation), it will continue running to render audio.
It will then mute capture as it does not need to capture and to remove the OS microphone capture indicator.
But, this prevents the other unit to actually capture.
We update CoreAudioCaptureUnit::updateMutedState by making sure to set muted to true only if there is no other audio unit doing capture.
We also update CoreAudioCaptureUnit::updateMutedState to only set kAUVoiceIOProperty_MuteOutput on the VPIO unit since it fails with non VPIO units.
Manually tested.
Canonical link: https://commits.webkit.org/302637@main1 parent 4cd951e commit a1aedbe
File tree
1 file changed
+7
-1
lines changed- Source/WebCore/platform/mediastream/mac
1 file changed
+7
-1
lines changedLines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
757 | | - | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
758 | 764 | | |
759 | 765 | | |
760 | 766 | | |
| |||
0 commit comments