mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-14 06:59:53 -05:00
fix build
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1935 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
efc81a8f20
commit
2198c2ec6e
1 changed files with 14 additions and 4 deletions
|
|
@ -385,7 +385,12 @@ int pa_rtpoll_run(pa_rtpoll *p, pa_bool_t wait) {
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
if (!p->dont_use_ppoll)
|
if (!p->dont_use_ppoll)
|
||||||
#endif
|
#endif
|
||||||
r = ppoll(p->pollfd, p->n_pollfd_used, p->timer_enabled ? &timeout : NULL, p->rtsig < 0 ? NULL : &p->sigset_unblocked);
|
{
|
||||||
|
struct timespec ts;
|
||||||
|
ts.tv_sec = timeout.tv_sec;
|
||||||
|
ts.tv_nsec = timeout.tv_usec * 1000;
|
||||||
|
r = ppoll(p->pollfd, p->n_pollfd_used, p->timer_enabled ? &ts : NULL, p->rtsig < 0 ? NULL : &p->sigset_unblocked);
|
||||||
|
}
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -477,15 +482,20 @@ static void update_timer(pa_rtpoll *p) {
|
||||||
memset(&its, 0, sizeof(its));
|
memset(&its, 0, sizeof(its));
|
||||||
|
|
||||||
if (p->timer_enabled) {
|
if (p->timer_enabled) {
|
||||||
its.it_value = p->next_elapse;
|
its.it_value.tv_sec = p->next_elapse.tv_sec;
|
||||||
|
its.it_value.tv_nsec = p->next_elapse.tv_usec*1000;
|
||||||
|
|
||||||
/* Make sure that 0,0 is not understood as
|
/* Make sure that 0,0 is not understood as
|
||||||
* "disarming" */
|
* "disarming" */
|
||||||
if (its.it_value.tv_sec == 0)
|
if (its.it_value.tv_sec == 0)
|
||||||
its.it_value.tv_nsec = 1;
|
its.it_value.tv_nsec = 1;
|
||||||
|
|
||||||
if (p->period > 0)
|
if (p->period > 0) {
|
||||||
pa_timespec_store(&its.it_interval, p->period);
|
struct timeval tv;
|
||||||
|
pa_timeval_store(&tv, p->period);
|
||||||
|
its.it_interval.tv_sec = tv.tv_sec;
|
||||||
|
its.it_interval.tv_nsec = tv.tv_usec*1000;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pa_assert_se(timer_settime(p->timer, TIMER_ABSTIME, &its, NULL) == 0);
|
pa_assert_se(timer_settime(p->timer, TIMER_ABSTIME, &its, NULL) == 0);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue