Skip to content

fix: restart PulseAudio after the last peer connection closes - #501

Merged
devopvoid merged 1 commit into
mainfrom
fix-pulseaudio-reinitialization-pr
Oct 31, 2026
Merged

devopvoid merged 1 commit into
mainfrom
fix-pulseaudio-reinitialization-pr

Conversation

@devopvoid

@devopvoid devopvoid commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Closing the last peer connection terminates the factory's audio device module. When another peer reuses the module, PulseAudio starts new processing threads with quit_ still set, so both playout and recording fail to start after a ten-second wait.

Reset quit_ under the existing mutex before spawning either thread. Apply this as a required Linux WebRTC patch, preserve LF line endings for Linux patches, and fail the build if the fix cannot be applied. Add opt-in PulseAudio integration coverage for five consecutive playout, recording, and receive-only SDP negotiation cycles with a reused factory and module (-Dwebrtc.test.pulseaudio=true).

Fixes #500.

@devopvoid
devopvoid merged commit f175af9 into main Oct 31, 2026
22 checks passed
@devopvoid
devopvoid deleted the fix-pulseaudio-reinitialization-pr branch October 31, 2026 22:08
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.

Audio playout never starts after the first PeerConnection is closed when one AudioDeviceModule is reused

1 participant