mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
mainloop: fix detection of rt clocks
This commit is contained in:
parent
cd5d6e7b42
commit
f84d755d6a
1 changed files with 7 additions and 8 deletions
|
|
@ -324,16 +324,15 @@ static pa_usec_t make_rt(const struct timeval *tv, pa_bool_t *use_rtclock) {
|
||||||
return PA_USEC_INVALID;
|
return PA_USEC_INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tv->tv_usec & PA_TIMEVAL_RTCLOCK) {
|
ttv = *tv;
|
||||||
ttv = *tv;
|
*use_rtclock = !!(ttv.tv_usec & PA_TIMEVAL_RTCLOCK);
|
||||||
|
|
||||||
|
if (*use_rtclock)
|
||||||
ttv.tv_usec &= ~PA_TIMEVAL_RTCLOCK;
|
ttv.tv_usec &= ~PA_TIMEVAL_RTCLOCK;
|
||||||
tv = pa_rtclock_from_wallclock(&ttv);
|
else
|
||||||
|
pa_rtclock_from_wallclock(&ttv);
|
||||||
|
|
||||||
*use_rtclock = TRUE;
|
return pa_timeval_load(&ttv);
|
||||||
} else
|
|
||||||
*use_rtclock = FALSE;
|
|
||||||
|
|
||||||
return pa_timeval_load(tv);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static pa_time_event* mainloop_time_new(
|
static pa_time_event* mainloop_time_new(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue