Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5dd3f262832b2ca143236ab8b15a3c9a38bc806a
https://github.com/WebKit/WebKit/commit/5dd3f262832b2ca143236ab8b15a3c9a38bc806a
Author: Youenn Fablet <[email protected]>
Date: 2024-10-10 (Thu, 10 Oct 2024)
Changed paths:
M Source/WebCore/platform/mediastream/mac/BaseAudioSharedUnit.cpp
M Source/WebCore/platform/mediastream/mac/BaseAudioSharedUnit.h
M Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.cpp
M Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.h
Log Message:
-----------
[Cocoa] voice activity detection does not work when changing of capturing
device
rdar://136356108
https://bugs.webkit.org/show_bug.cgi?id=280055
Reviewed by Andy Estes.
When moving capture from say AirPods to default microphone, we would not
unregister the voice detection listener for the AirPods,
and we would not register the voice detection listeners for the default
microphone.
This would prevent voice detection to work properly.
In case of capture device change, we are now unregistering the voice detection
listener before changing of capture device.
This is done by adding an optional boolean parameter to
CoreAudioSharedUnit::updateVoiceActiveDetection which is renamed to
CoreAudioSharedUnit::updateVoiceActivityDetection.
We then call CoreAudioSharedUnit::updateVoiceActivityDetection after having
changed of capture device to readd the listener if needed.
Manually tested.
* Source/WebCore/platform/mediastream/mac/BaseAudioSharedUnit.cpp:
(WebCore::BaseAudioSharedUnit::setCaptureDevice):
(WebCore::BaseAudioSharedUnit::voiceActivityDetected):
* Source/WebCore/platform/mediastream/mac/BaseAudioSharedUnit.h:
(WebCore::BaseAudioSharedUnit::willChangeCaptureDevice):
* Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.cpp:
(WebCore::CoreAudioSharedUnit::~CoreAudioSharedUnit):
(WebCore::CoreAudioSharedUnit::captureDeviceChanged):
(WebCore::CoreAudioSharedUnit::cleanupAudioUnit):
(WebCore::CoreAudioSharedUnit::startInternal):
(WebCore::CoreAudioSharedUnit::isProducingMicrophoneSamplesChanged):
(WebCore::CoreAudioSharedUnit::stopInternal):
(WebCore::CoreAudioSharedUnit::updateVoiceActivityDetection):
(WebCore::CoreAudioSharedUnit::enableMutedSpeechActivityEventListener):
(WebCore::CoreAudioSharedUnit::disableMutedSpeechActivityEventListener):
(WebCore::CoreAudioSharedUnit::willChangeCaptureDevice):
(WebCore::CoreAudioSharedUnit::updateVoiceActiveDetection): Deleted.
* Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.h:
Canonical link: https://commits.webkit.org/284979@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes