summaryrefslogtreecommitdiffstats
path: root/src/polypcore/core-scache.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-04-22 21:50:15 +0000
committerLennart Poettering <lennart@poettering.net>2006-04-22 21:50:15 +0000
commitec65ca6ae758610a46c95fbf589729fb15cf1daf (patch)
tree65de55e9d9ef6eea03c6834be3d4a7f7658f167c /src/polypcore/core-scache.c
parent5e50f84e71b948b4737fe8b5860e5fe414258570 (diff)
when loading sound files, initialize channel map data properly
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@777 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/polypcore/core-scache.c')
-rw-r--r--src/polypcore/core-scache.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/polypcore/core-scache.c b/src/polypcore/core-scache.c
index 394bdab4..6632a171 100644
--- a/src/polypcore/core-scache.c
+++ b/src/polypcore/core-scache.c
@@ -157,6 +157,7 @@ int pa_scache_add_item(pa_core *c, const char *name, const pa_sample_spec *ss, c
int pa_scache_add_file(pa_core *c, const char *name, const char *filename, uint32_t *idx) {
pa_sample_spec ss;
+ pa_channel_map map;
pa_memchunk chunk;
int r;
@@ -167,10 +168,10 @@ int pa_scache_add_file(pa_core *c, const char *name, const char *filename, uint3
filename = buf;
#endif
- if (pa_sound_file_load(filename, &ss, &chunk, c->memblock_stat) < 0)
+ if (pa_sound_file_load(filename, &ss, &map, &chunk, c->memblock_stat) < 0)
return -1;
- r = pa_scache_add_item(c, name, &ss, NULL, &chunk, idx);
+ r = pa_scache_add_item(c, name, &ss, &map, &chunk, idx);
pa_memblock_unref(chunk.memblock);
return r;
@@ -252,7 +253,7 @@ int pa_scache_play_item(pa_core *c, const char *name, pa_sink *sink, const pa_cv
return -1;
if (e->lazy && !e->memchunk.memblock) {
- if (pa_sound_file_load(e->filename, &e->sample_spec, &e->memchunk, c->memblock_stat) < 0)
+ if (pa_sound_file_load(e->filename, &e->sample_spec, &e->channel_map, &e->memchunk, c->memblock_stat) < 0)
return -1;
pa_subscription_post(c, PA_SUBSCRIPTION_EVENT_SAMPLE_CACHE|PA_SUBSCRIPTION_EVENT_CHANGE, e->index);