diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-09-01 12:21:06 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-09-01 12:21:06 +0000 |
commit | fa19d6ab7e2df69902d94a38cc03a183f6d97670 (patch) | |
tree | 84f2124168b752143fa9430e0684b1244936d7b8 /polyp/scache.c | |
parent | 36550f4a66ae28e1b81b9b818c38cd0fcd1302a1 (diff) |
implement missing scache_get_id_by_name
add some more consts to idxset
add module-sine, a sine generating sink_input module
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@165 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/scache.c')
-rw-r--r-- | polyp/scache.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/polyp/scache.c b/polyp/scache.c index f3c15934..311d68a4 100644 --- a/polyp/scache.c +++ b/polyp/scache.c @@ -157,5 +157,14 @@ const char * pa_scache_get_name_by_id(struct pa_core *c, uint32_t id) { return NULL; return e->name; - +} + +uint32_t pa_scache_get_id_by_name(struct pa_core *c, const char *name) { + struct pa_scache_entry *e; + assert(c && name); + + if (!c->scache || !(e = pa_idxset_get_by_data(c->scache, name, NULL))) + return PA_IDXSET_INVALID; + + return e->index; } |