pulse-server: send server change events when default nodes change
Send server change events to subscribers, when default nodes change due to some nodes being added/removed/changed, also if there is no metadata change. Make sure the event is consistent with the result from find_device at the time.
Previously, these were not necessarily sent, or information from find_device immediately after the event might not reflect the change yet.
Repro for #555 (closed):
- Restart pipewire-pulse.
- Open pavucenter, turn all card profiles to off except for two (say A and B), so that you have two sinks (A & B).
- Select sink A as default.
- Turn card A profile to off. (-> default moves automatically to sink B)
- Turn card A profile back to on. (-> default moves automatically back to sink A)
- Check current default with
pactl info
in terminal. It should be A. - But Gnome volume keys still adjust device B. Pavucenter is now also confused and shows B as default.
This MR fixes this. (Whether there are other problems that could cause #555 (closed) by some other mechanism, I don't know.)
Edited by P V