From 295e1c83aca1928cf4473d67a4a888aab472cf03 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 13 Jul 2007 00:09:59 +0000 Subject: Make pa_sink_render_* and pa_source_post work only when in RUNNING state, to fix handling of monitor sources when their sink is suspended git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1509 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/pulsecore/sink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pulsecore/sink.c') diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index d5ca061f..ced23a51 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -361,7 +361,7 @@ void pa_sink_render(pa_sink*s, size_t length, pa_memchunk *result) { pa_sink_ref(s); - n = fill_mix_info(s, info, MAX_MIX_CHANNELS); + n = s->thread_info.state == PA_SINK_RUNNING ? fill_mix_info(s, info, MAX_MIX_CHANNELS) : 0; if (n == 0) { @@ -426,7 +426,7 @@ void pa_sink_render_into(pa_sink*s, pa_memchunk *target) { pa_sink_ref(s); - n = fill_mix_info(s, info, MAX_MIX_CHANNELS); + n = s->thread_info.state == PA_SINK_RUNNING ? fill_mix_info(s, info, MAX_MIX_CHANNELS) : 0; if (n == 0) { pa_silence_memchunk(target, &s->sample_spec); -- cgit