Skip to content
This repository was archived by the owner on Mar 22, 2022. It is now read-only.

Commit 8bcd3e4

Browse files
committed
Disable audio processing which deadlocks on UWP
Set audio buffer events to false, which disable audio processing registration. The audio processing callbacks in UWP use WebrtcObserver::Process() which defers the work to another thread and blocks, while holding the audio capture or render lock. If that other thread (e.g. UI thread) is blocking on the signaling thread to do some audio property change, which in turn often need the audio capture or render lock to actually apply those changes, the whole system deadlocks. As there is currently no use for audio processing (not exposed), disable it altogether.
1 parent fa268d2 commit 8bcd3e4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • libs/Microsoft.MixedReality.WebRTC.Native/src

libs/Microsoft.MixedReality.WebRTC.Native/src/api.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ class GlobalFactory {
191191
factoryConfig->thisWeak_ = factoryConfig; // mimic wrapper_create()
192192
factoryConfig->audioCapturingEnabled = true;
193193
factoryConfig->audioRenderingEnabled = true;
194-
factoryConfig->enableAudioBufferEvents = true;
194+
factoryConfig->enableAudioBufferEvents = false;
195195
impl_ = std::make_shared<wrapper::impl::org::webRtc::WebRtcFactory>();
196196
impl_->thisWeak_ = impl_; // mimic wrapper_create()
197197
impl_->wrapper_init_org_webRtc_WebRtcFactory(factoryConfig);

0 commit comments

Comments
 (0)