aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cubeb_pulse.c
diff options
context:
space:
mode:
authorAlex Chronopoulos <[email protected]>2017-02-06 12:17:56 +0200
committerPaul Adenot <[email protected]>2017-02-06 16:02:27 +0100
commit99d1ff122a96a096368fab94485ecae8dda5b86b (patch)
tree060253c4ebe17592b197a97fee4ab7df6a60e23e /src/cubeb_pulse.c
parent2fb0dfc35d752e936433cbf276169897a6365d5f (diff)
downloadcubeb-99d1ff122a96a096368fab94485ecae8dda5b86b.tar.gz
cubeb-99d1ff122a96a096368fab94485ecae8dda5b86b.zip
pulse: For default device enable Preferred All. (Bug 1332887)
Diffstat (limited to 'src/cubeb_pulse.c')
-rw-r--r--src/cubeb_pulse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cubeb_pulse.c b/src/cubeb_pulse.c
index 75f1b3b..256a051 100644
--- a/src/cubeb_pulse.c
+++ b/src/cubeb_pulse.c
@@ -1270,7 +1270,8 @@ pulse_sink_info_cb(pa_context * context, const pa_sink_info * info,
devinfo->type = CUBEB_DEVICE_TYPE_OUTPUT;
devinfo->state = pulse_get_state_from_sink_port(info->active_port);
- devinfo->preferred = strcmp(info->name, list_data->default_sink_name) == 0;
+ devinfo->preferred = (strcmp(info->name, list_data->default_sink_name) == 0) ?
+ CUBEB_DEVICE_PREF_ALL : CUBEB_DEVICE_PREF_NONE;
devinfo->format = CUBEB_DEVICE_FMT_ALL;
devinfo->default_format = pulse_format_to_cubeb_format(info->sample_spec.format);
@@ -1330,7 +1331,8 @@ pulse_source_info_cb(pa_context * context, const pa_source_info * info,
devinfo->type = CUBEB_DEVICE_TYPE_INPUT;
devinfo->state = pulse_get_state_from_source_port(info->active_port);
- devinfo->preferred = strcmp(info->name, list_data->default_source_name) == 0;
+ devinfo->preferred = (strcmp(info->name, list_data->default_source_name) == 0) ?
+ CUBEB_DEVICE_PREF_ALL : CUBEB_DEVICE_PREF_NONE;
devinfo->format = CUBEB_DEVICE_FMT_ALL;
devinfo->default_format = pulse_format_to_cubeb_format(info->sample_spec.format);