diff options
Diffstat (limited to 'src/modules/module-waveout.c')
-rw-r--r-- | src/modules/module-waveout.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/modules/module-waveout.c b/src/modules/module-waveout.c index 53efce9e..d02bb6b5 100644 --- a/src/modules/module-waveout.c +++ b/src/modules/module-waveout.c @@ -255,13 +255,16 @@ static void thread_func(void *userdata) { int ret; pa_bool_t need_timer = FALSE; - if (u->sink && PA_SINK_IS_OPENED(u->sink->thread_info.state)) { + if (u->sink) { if (u->sink->thread_info.rewind_requested) pa_sink_process_rewind(u->sink, 0); - do_write(u); - need_timer = TRUE; + if (PA_SINK_IS_OPENED(u->sink->thread_info.state)) { + do_write(u); + need_timer = TRUE; + } } + if (u->source && PA_SOURCE_IS_OPENED(u->source->thread_info.state)) { do_read(u); need_timer = TRUE; |