diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-09-27 21:05:55 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-09-27 21:05:55 +0000 |
commit | 450ad85b35bd600ed020f7ec119d51e7e7bc01a4 (patch) | |
tree | 4e0079eaf12964a6b312f58e92dd1aac47af40b7 /polyp/scache.c | |
parent | f014d466cd5f65b03a7a1608aa3d4cd83425a56e (diff) |
try to use file sample type for cache entries and play-file playback
allow paplay to use STDIN
add new module: module-match
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@244 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/scache.c')
-rw-r--r-- | polyp/scache.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/polyp/scache.c b/polyp/scache.c index b17f3242..32977854 100644 --- a/polyp/scache.c +++ b/polyp/scache.c @@ -37,6 +37,7 @@ #include "subscribe.h" #include "namereg.h" #include "sound-file.h" +#include "util.h" #define UNLOAD_POLL_TIME 2 @@ -199,6 +200,7 @@ void pa_scache_free(struct pa_core *c) { int pa_scache_play_item(struct pa_core *c, const char *name, struct pa_sink *sink, uint32_t volume) { struct pa_scache_entry *e; + char *t; assert(c && name && sink); if (!(e = pa_namereg_get(c, name, PA_NAMEREG_SAMPLE, 1))) @@ -214,8 +216,13 @@ int pa_scache_play_item(struct pa_core *c, const char *name, struct pa_sink *sin if (!e->memchunk.memblock) return -1; - if (pa_play_memchunk(sink, name, &e->sample_spec, &e->memchunk, pa_volume_multiply(volume, e->volume)) < 0) + t = pa_sprintf_malloc("sample:%s", name); + if (pa_play_memchunk(sink, t, &e->sample_spec, &e->memchunk, pa_volume_multiply(volume, e->volume)) < 0) { + free(t); return -1; + } + + free(t); if (e->lazy) time(&e->last_used_time); |