mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
core: Internally deprecate pa_port_available_t to use pa_available_t
Generalize the availability flag in order to be used beyond the scope of ports. However, pa_port_availability_t is left unchanged to avoid modifying the protocol and the client API. This should be replaced by pa_available_t after a validation phase of this new generic enum type.
This commit is contained in:
parent
3aefdd995c
commit
8851644a3c
12 changed files with 68 additions and 58 deletions
|
|
@ -139,7 +139,7 @@ static pa_device_port* find_best_port(pa_hashmap *ports) {
|
|||
pa_device_port *result = NULL;
|
||||
|
||||
PA_HASHMAP_FOREACH(port, ports, state) {
|
||||
if (port->available != PA_PORT_AVAILABLE_YES)
|
||||
if (port->available != PA_AVAILABLE_YES)
|
||||
continue;
|
||||
|
||||
if (result == NULL || port->priority > result->priority)
|
||||
|
|
@ -193,10 +193,10 @@ static pa_hook_result_t port_available_hook_callback(pa_core *c, pa_device_port
|
|||
|
||||
is_active_profile = card->active_profile == pa_hashmap_get(port->profiles, card->active_profile->name);
|
||||
|
||||
if (is_active_profile && port->available == PA_PORT_AVAILABLE_YES)
|
||||
if (is_active_profile && port->available == PA_AVAILABLE_YES)
|
||||
return PA_HOOK_OK;
|
||||
|
||||
if (!is_active_profile && port->available != PA_PORT_AVAILABLE_YES)
|
||||
if (!is_active_profile && port->available != PA_AVAILABLE_YES)
|
||||
return PA_HOOK_OK;
|
||||
|
||||
if ((port2 = find_best_port(card->ports)) == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue