allow cards be referenced by their index

This commit is contained in:
Lennart Poettering 2009-01-21 01:53:09 +01:00
parent b6b0e07c31
commit 9a0dbda654

View file

@ -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);
else if (type == PA_NAMEREG_SAMPLE && c->scache)
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;
}