summaryrefslogtreecommitdiffstats
path: root/src/pulsecore
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-01-21 01:53:09 +0100
committerLennart Poettering <lennart@poettering.net>2009-01-21 01:53:09 +0100
commit9a0dbda654614214d1f0a3556d814a415ef212eb (patch)
tree8ddebbef30d2d0958883cb224909d3c2abb87361 /src/pulsecore
parentb6b0e07c316be822ced5136fd29d96976ccab0f2 (diff)
allow cards be referenced by their index
Diffstat (limited to 'src/pulsecore')
-rw-r--r--src/pulsecore/namereg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pulsecore/namereg.c b/src/pulsecore/namereg.c
index 2734bab7..ed652abb 100644
--- a/src/pulsecore/namereg.c
+++ b/src/pulsecore/namereg.c
@@ -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;
}