scache: when playing a sample from the cache make sure not queue them up when the sink is suspended

libcanberra already sets the appropriate flags for uncached sample
streams, we now need to make sure to set them for cached samples too.
This commit is contained in:
Lennart Poettering 2010-02-21 17:35:05 +01:00
parent 3f1c90b9d7
commit ea29b11097
5 changed files with 31 additions and 19 deletions

View file

@ -351,7 +351,12 @@ int pa_scache_play_item(pa_core *c, const char *name, pa_sink *sink, pa_volume_t
if (p)
pa_proplist_update(merged, PA_UPDATE_REPLACE, p);
if (pa_play_memchunk(sink, &e->sample_spec, &e->channel_map, &e->memchunk, pass_volume ? &r : NULL, merged, sink_input_idx) < 0)
if (pa_play_memchunk(sink,
&e->sample_spec, &e->channel_map,
&e->memchunk,
pass_volume ? &r : NULL,
merged,
PA_SINK_INPUT_NO_CREATE_ON_SUSPEND|PA_SINK_INPUT_KILL_ON_SUSPEND, sink_input_idx) < 0)
goto fail;
pa_proplist_free(merged);