summaryrefslogtreecommitdiffstats
path: root/polyp/scache.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-09-15 19:16:57 +0000
committerLennart Poettering <lennart@poettering.net>2004-09-15 19:16:57 +0000
commitf5d47a293aa32a8273ef02c597cb263527726465 (patch)
tree82e34cdafba576e1e28a643df3e814de611ccaf4 /polyp/scache.c
parent9ca72dce0bda4e279ff82a01847ee09a72434b33 (diff)
work around C99/GCC incompatibility
native protocol: add "local" field to pa_context add volume paramter to pa_stream_connect_playback add support for renaming streams/clients support lazy samples add functions to kill clients/source inputs/sink outputs add functions for loading/unloading modules add autoload management API git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@204 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/scache.c')
-rw-r--r--polyp/scache.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/polyp/scache.c b/polyp/scache.c
index 026f4b17..963a4f86 100644
--- a/polyp/scache.c
+++ b/polyp/scache.c
@@ -141,6 +141,7 @@ int pa_scache_add_file(struct pa_core *c, const char *name, const char *filename
r = pa_scache_add_item(c, name, &ss, &chunk, index);
pa_memblock_unref(chunk.memblock);
+
return r;
}
@@ -203,9 +204,12 @@ int pa_scache_play_item(struct pa_core *c, const char *name, struct pa_sink *sin
if (!(e = pa_namereg_get(c, name, PA_NAMEREG_SAMPLE, 1)))
return -1;
- if (e->lazy && !e->memchunk.memblock)
+ if (e->lazy && !e->memchunk.memblock) {
if (pa_sound_file_load(e->filename, &e->sample_spec, &e->memchunk, c->memblock_stat) < 0)
return -1;
+
+ pa_subscription_post(c, PA_SUBSCRIPTION_EVENT_SAMPLE_CACHE|PA_SUBSCRIPTION_EVENT_CHANGE, e->index);
+ }
if (!e->memchunk.memblock)
return -1;
@@ -276,5 +280,7 @@ void pa_scache_unload_unused(struct pa_core *c) {
pa_memblock_unref(e->memchunk.memblock);
e->memchunk.memblock = NULL;
e->memchunk.index = e->memchunk.length = 0;
+
+ pa_subscription_post(c, PA_SUBSCRIPTION_EVENT_SAMPLE_CACHE|PA_SUBSCRIPTION_EVENT_CHANGE, e->index);
}
}