Skip to content

fix: throw instead of aborting when the default audio device module fails to initialize - #276

Merged
devopvoid merged 1 commit into
devopvoid:mainfrom
SendableMetatype:fix/default-audio-module-init
Sep 7, 2026
Merged

fix: throw instead of aborting when the default audio device module fails to initialize#276
devopvoid merged 1 commit into
devopvoid:mainfrom
SendableMetatype:fix/default-audio-module-init

Conversation

@SendableMetatype

Copy link
Copy Markdown
Contributor

When no AudioDeviceModule is passed, PeerConnectionFactory lets libwebrtc create the platform default, and libwebrtc aborts the whole process when that module fails to initialize, which happens on hosts without an audio system such as containers and virtual machines; the second half of #228 is one such crash. The factory now creates the default module itself, the same way AudioDeviceModule already does for an explicit module, so the failure surfaces as an exception telling the application to pass a module created with AudioLayer.kDummyAudio instead. A test creates the factory without a module and accepts either outcome except a dead process.

…ails to initialize

When no AudioDeviceModule is passed, PeerConnectionFactory lets
libwebrtc create the platform default, and libwebrtc aborts the whole
process when that module fails to initialize, which happens on hosts
without an audio system such as containers and virtual machines. The
factory now creates the default module itself, the same way
AudioDeviceModule does, so the failure surfaces as an exception that
tells the application to pass a module created with
AudioLayer.kDummyAudio instead.
@devopvoid
devopvoid merged commit 0f045fa into devopvoid:main Sep 7, 2026
11 checks passed
@SendableMetatype
SendableMetatype deleted the fix/default-audio-module-init branch September 8, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants