diff options
-rw-r--r-- | src/pulsecore/core-scache.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pulsecore/core-scache.c b/src/pulsecore/core-scache.c index 75fb47f0..cb272784 100644 --- a/src/pulsecore/core-scache.c +++ b/src/pulsecore/core-scache.c @@ -138,6 +138,7 @@ static pa_scache_entry* scache_add_item(pa_core *c, const char *name) { int pa_scache_add_item(pa_core *c, const char *name, const pa_sample_spec *ss, const pa_channel_map *map, const pa_memchunk *chunk, uint32_t *idx) { pa_scache_entry *e; + char st[PA_SAMPLE_SPEC_SNPRINT_MAX]; assert(c && name); if (chunk && chunk->length > PA_SCACHE_ENTRY_SIZE_MAX) @@ -163,6 +164,10 @@ int pa_scache_add_item(pa_core *c, const char *name, const pa_sample_spec *ss, c if (idx) *idx = e->index; + pa_log_debug("created sample \"%s\" (#%d), %d bytes with sample spec %s", + name, e->index, e->memchunk.length, + pa_sample_spec_snprint(st, sizeof(st), &e->sample_spec)); + return 0; } @@ -229,7 +234,10 @@ int pa_scache_remove_item(pa_core *c, const char *name) { if (pa_idxset_remove_by_data(c->scache, e, NULL) != e) assert(0); + pa_log_debug("removed sample \"%s\"", name); + free_entry(e); + return 0; } @@ -276,6 +284,8 @@ int pa_scache_play_item(pa_core *c, const char *name, pa_sink *sink, pa_volume_t if (!e->memchunk.memblock) return -1; + pa_log_debug("playing sample \"%s\" on \"%s\"", name, sink->name); + t = pa_sprintf_malloc("sample:%s", name); pa_cvolume_set(&r, e->volume.channels, volume); |