On 2015-10-27 16:09, David Henningsson wrote:
+static const char* profile_name_for_dir(pa_card_profile *cp, pa_direction_t
dir) {
+ if (dir == PA_DIRECTION_OUTPUT && cp->output_name)
+ return cp->output_name;
+ if (dir == PA_DIRECTION_INPUT && cp->input_name)
+ return cp->input_name;
+ return cp->name;
+}
The previous discussion made me think that maybe this should change to
the below (sorry about the word wrapping) :
static const char* profile_name_for_dir(pa_card_profile *cp,
pa_direction_t dir) {
if (cp->output_name || cp->input_name)
return dir == PA_DIRECTION_OUTPUT ? cp->output_name :
cp->input_name;
return cp->name;
}
...but it does not matter, because you will never call
profile_name_for_dir for a direction with no sinks/sources anyhow.
--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss