mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-09 13:29:59 -05:00
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:
parent
3f1c90b9d7
commit
ea29b11097
5 changed files with 31 additions and 19 deletions
|
|
@ -173,7 +173,8 @@ pa_sink_input* pa_memblockq_sink_input_new(
|
|||
const pa_channel_map *map,
|
||||
pa_memblockq *q,
|
||||
pa_cvolume *volume,
|
||||
pa_proplist *p) {
|
||||
pa_proplist *p,
|
||||
pa_sink_input_flags_t flags) {
|
||||
|
||||
memblockq_stream *u = NULL;
|
||||
pa_sink_input_new_data data;
|
||||
|
|
@ -198,6 +199,7 @@ pa_sink_input* pa_memblockq_sink_input_new(
|
|||
pa_sink_input_new_data_set_channel_map(&data, map);
|
||||
pa_sink_input_new_data_set_volume(&data, volume);
|
||||
pa_proplist_update(data.proplist, PA_UPDATE_REPLACE, p);
|
||||
data.flags |= flags;
|
||||
|
||||
pa_sink_input_new(&u->sink_input, sink->core, &data);
|
||||
pa_sink_input_new_data_done(&data);
|
||||
|
|
@ -237,6 +239,7 @@ int pa_play_memblockq(
|
|||
pa_memblockq *q,
|
||||
pa_cvolume *volume,
|
||||
pa_proplist *p,
|
||||
pa_sink_input_flags_t flags,
|
||||
uint32_t *sink_input_index) {
|
||||
|
||||
pa_sink_input *i;
|
||||
|
|
@ -245,7 +248,7 @@ int pa_play_memblockq(
|
|||
pa_assert(ss);
|
||||
pa_assert(q);
|
||||
|
||||
if (!(i = pa_memblockq_sink_input_new(sink, ss, map, q, volume, p)))
|
||||
if (!(i = pa_memblockq_sink_input_new(sink, ss, map, q, volume, p, flags)))
|
||||
return -1;
|
||||
|
||||
pa_sink_input_put(i);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue