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
This commit is contained in:
Lennart Poettering 2007-07-13 00:09:59 +00:00
parent 0a095f6266
commit 295e1c83ac
2 changed files with 5 additions and 2 deletions

View file

@ -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);