[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] stream-restore: Restore preferred device for new streams
Tanu Kaskinen
gitlab at gitlab.freedesktop.org
Thu Apr 9 17:38:42 UTC 2020
Tanu Kaskinen pushed to branch master at PulseAudio / pulseaudio
Commits:
9c7e49fa by Georg Chini at 2020-04-09T17:33:03+00:00
stream-restore: Restore preferred device for new streams
Currently the preferred device will not be restored for new streams if the
device is currently not avilable. This patch fixes the problem.
- - - - -
1 changed file:
- src/modules/module-stream-restore.c
Changes:
=====================================
src/modules/module-stream-restore.c
=====================================
@@ -1450,8 +1450,10 @@ static pa_hook_result_t sink_input_new_hook_callback(pa_core *c, pa_sink_input_n
else if ((e = entry_read(u, name))) {
pa_sink *s = NULL;
- if (e->device_valid)
+ if (e->device_valid) {
s = pa_namereg_get(c, e->device, PA_NAMEREG_SINK);
+ new_data->preferred_sink = pa_xstrdup(e->device);
+ }
if (!s && e->card_valid) {
pa_card *card;
@@ -1555,8 +1557,10 @@ static pa_hook_result_t source_output_new_hook_callback(pa_core *c, pa_source_ou
else if ((e = entry_read(u, name))) {
pa_source *s = NULL;
- if (e->device_valid)
+ if (e->device_valid) {
s = pa_namereg_get(c, e->device, PA_NAMEREG_SOURCE);
+ new_data->preferred_source = pa_xstrdup(e->device);
+ }
if (!s && e->card_valid) {
pa_card *card;
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/9c7e49fa1096072c8ff5f361e45acf2e6a767db6
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/9c7e49fa1096072c8ff5f361e45acf2e6a767db6
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20200409/6199fc57/attachment-0001.htm>
More information about the pulseaudio-commits
mailing list