diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-01-15 00:07:38 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-01-15 00:07:38 +0100 |
commit | 06de6393d1426110c2b0d20a6bbc2685c2138e25 (patch) | |
tree | 107101e9235b6f55b99c02c9210b791cff005f57 /src/pulsecore/sink.c | |
parent | d1cf0e7845b3944fb676a46b528bea519b41e42b (diff) |
don't rely on PA_SINK_RUNNING vs. PA_SINK_IDLE for optimizations since it might not be fully up to date
Diffstat (limited to 'src/pulsecore/sink.c')
-rw-r--r-- | src/pulsecore/sink.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index 48c8f794..3a662383 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -642,7 +642,7 @@ void pa_sink_render(pa_sink*s, size_t length, pa_memchunk *result) { pa_assert(length > 0); - n = s->thread_info.state == PA_SINK_RUNNING ? fill_mix_info(s, &length, info, MAX_MIX_CHANNELS) : 0; + n = fill_mix_info(s, &length, info, MAX_MIX_CHANNELS); if (n == 0) { @@ -685,8 +685,7 @@ void pa_sink_render(pa_sink*s, size_t length, pa_memchunk *result) { result->index = 0; } - if (s->thread_info.state == PA_SINK_RUNNING) - inputs_drop(s, info, n, result); + inputs_drop(s, info, n, result); pa_sink_unref(s); } @@ -716,7 +715,7 @@ void pa_sink_render_into(pa_sink*s, pa_memchunk *target) { pa_assert(length > 0); - n = s->thread_info.state == PA_SINK_RUNNING ? fill_mix_info(s, &length, info, MAX_MIX_CHANNELS) : 0; + n = fill_mix_info(s, &length, info, MAX_MIX_CHANNELS); if (n == 0) { if (target->length > length) @@ -765,8 +764,7 @@ void pa_sink_render_into(pa_sink*s, pa_memchunk *target) { pa_memblock_release(target->memblock); } - if (s->thread_info.state == PA_SINK_RUNNING) - inputs_drop(s, info, n, target); + inputs_drop(s, info, n, target); pa_sink_unref(s); } |