if (state == PA_SOURCE_RUNNING) {
/* restart timer when both sink and source are active */
- if (IS_ACTIVE(u) && u->adjust_time)
+ if ((pa_sink_get_state(u->sink) == PA_SINK_RUNNING) && u->adjust_time)
pa_core_rttime_restart(u->core, u->time_event, pa_rtclock_now() + u->adjust_time);
pa_atomic_store(&u->request_resync, 1);
if (state == PA_SINK_RUNNING) {
/* restart timer when both sink and source are active */
- if (IS_ACTIVE(u) && u->adjust_time)
+ if ((pa_source_get_state(u->source) == PA_SOURCE_RUNNING) && u->adjust_time)
pa_core_rttime_restart(u->core, u->time_event, pa_rtclock_now() + u->adjust_time);
pa_atomic_store(&u->request_resync, 1);