Reconnect the knob and per-app audio clients when pipewire-pulse restarts #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "pulse-reconnect"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #4. After a pipewire-pulse restart, the Game/Chat/Mic knobs (
EndpointPulse) and the per-app volume list (AudioPulse) silently stopped working until miraboxd was restarted, because both connected once at startup and never checked again.daemon/PulseContext.h: a shared libpulse mainloop and context. Every public call checks it first, and a dead context is rebuilt lazily with backoff (2s doubling to 30s), so a server that stays down costs nothing per call.AudioPulsedrops its peak streams and index-keyed caches on reconnect, since the restarted server renumbers sinks and sink-inputs.EndpointPulsekeeps its per-endpoint reference gains across reconnects.Tested: restarted pipewire-pulse under the new build. All three clients (endpoints, apps, spectrum) logged lost → reconnected with no miraboxd restart. Afterwards the
EndpointsandListAppsD-Bus calls returned live data, and a live app peak (Zoom 0.387) showed the meters were rebuilt.🤖 Generated with Claude Code