]> code.delx.au - pulseaudio/blob - polyp/scache.h
implement proper refcounting in polyplib
[pulseaudio] / polyp / scache.h
1 #ifndef fooscachehfoo
2 #define fooscachehfoo
3
4 #include "core.h"
5 #include "memchunk.h"
6 #include "sink.h"
7
8 struct pa_scache_entry {
9 struct pa_core *core;
10 uint32_t index;
11 char *name;
12 uint32_t volume;
13 struct pa_sample_spec sample_spec;
14 struct pa_memchunk memchunk;
15 };
16
17 void pa_scache_add_item(struct pa_core *c, const char *name, struct pa_sample_spec *ss, struct pa_memchunk *chunk, uint32_t *index);
18
19 int pa_scache_remove_item(struct pa_core *c, const char *name);
20 int pa_scache_play_item(struct pa_core *c, const char *name, struct pa_sink *sink, uint32_t volume);
21 void pa_scache_free(struct pa_core *c);
22
23 const char *pa_scache_get_name_by_id(struct pa_core *c, uint32_t id);
24 uint32_t pa_scache_get_id_by_name(struct pa_core *c, const char *name);
25
26 #endif