mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-12 13:30:10 -05:00
device-port: add type member
The clients might wanna to know for which purpose is the port. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
861836c5f7
commit
feee531c2b
9 changed files with 77 additions and 10 deletions
|
|
@ -29,6 +29,7 @@ pa_device_port_new_data *pa_device_port_new_data_init(pa_device_port_new_data *d
|
|||
pa_assert(data);
|
||||
|
||||
pa_zero(*data);
|
||||
data->type = PA_DEVICE_PORT_TYPE_UNKNOWN;
|
||||
data->available = PA_AVAILABLE_UNKNOWN;
|
||||
return data;
|
||||
}
|
||||
|
|
@ -66,6 +67,12 @@ void pa_device_port_new_data_set_direction(pa_device_port_new_data *data, pa_dir
|
|||
data->direction = direction;
|
||||
}
|
||||
|
||||
void pa_device_port_new_data_set_type(pa_device_port_new_data *data, pa_device_port_type_t type) {
|
||||
pa_assert(data);
|
||||
|
||||
data->type = type;
|
||||
}
|
||||
|
||||
void pa_device_port_new_data_done(pa_device_port_new_data *data) {
|
||||
pa_assert(data);
|
||||
|
||||
|
|
@ -182,6 +189,7 @@ pa_device_port *pa_device_port_new(pa_core *c, pa_device_port_new_data *data, si
|
|||
data->available_group = NULL;
|
||||
p->profiles = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
|
||||
p->direction = data->direction;
|
||||
p->type = data->type;
|
||||
|
||||
p->latency_offset = 0;
|
||||
p->proplist = pa_proplist_new();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue