add total sample cache size to statistics

add size to sample cache entry info


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@175 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2004-09-01 22:46:27 +00:00
parent 5f52999c01
commit c73a298f88
6 changed files with 25 additions and 2 deletions

View file

@ -168,3 +168,18 @@ uint32_t pa_scache_get_id_by_name(struct pa_core *c, const char *name) {
return e->index;
}
uint32_t pa_scache_total_size(struct pa_core *c) {
struct pa_scache_entry *e;
uint32_t index;
uint32_t sum;
if (!c->scache)
return 0;
for (e = pa_idxset_first(c->scache, &index); e; e = pa_idxset_next(c->scache, &index))
sum += e->memchunk.length;
return sum;
}