mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
allow cards be referenced by their index
This commit is contained in:
parent
b6b0e07c31
commit
9a0dbda654
1 changed files with 2 additions and 0 deletions
|
|
@ -223,6 +223,8 @@ void* pa_namereg_get(pa_core *c, const char *name, pa_namereg_type_t type) {
|
||||||
return pa_idxset_get_by_index(c->sources, idx);
|
return pa_idxset_get_by_index(c->sources, idx);
|
||||||
else if (type == PA_NAMEREG_SAMPLE && c->scache)
|
else if (type == PA_NAMEREG_SAMPLE && c->scache)
|
||||||
return pa_idxset_get_by_index(c->scache, idx);
|
return pa_idxset_get_by_index(c->scache, idx);
|
||||||
|
else if (type == PA_NAMEREG_CARD)
|
||||||
|
return pa_idxset_get_by_index(c->cards, idx);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue