mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2026-02-24 01:40:18 -05:00
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:
parent
5f52999c01
commit
c73a298f88
6 changed files with 25 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue