Browse Source

pulse: fix build pulseaudio 6.0 or higher

Discovered in #321.  The number of argument for pa_rtpoll_run have
been changed since 6.0.

>=6.0 : int pa_rtpoll_run(pa_rtpoll *f);
<6.0  : int pa_rtpoll_run(pa_rtpoll *f, bool wait);

Check pulseaudio version by PA_CHECK_VERSION macro introduced since
pulseaudio 0.9.16.  In case PA_CHECK_VERSION is not defined,
pa_rtpoll_run takes 2 arguments.
pull/1/head
Koichiro IWAO 8 years ago
parent
commit
a67966d034
2 changed files with 10 additions and 1 deletions
  1. +4
    -0
      module-xrdp-sink.c
  2. +6
    -1
      module-xrdp-source.c

+ 4
- 0
module-xrdp-sink.c View File

@ -440,7 +440,11 @@ static void thread_func(void *userdata) {
pa_rtpoll_set_timer_disabled(u->rtpoll);
}
#if defined(PA_CHECK_VERSION) && PA_CHECK_VERSION(6, 0, 0)
if ((ret = pa_rtpoll_run(u->rtpoll)) < 0) {
#else
if ((ret = pa_rtpoll_run(u->rtpoll, TRUE)) < 0) {
#endif
goto fail;
}


+ 6
- 1
module-xrdp-source.c View File

@ -339,8 +339,13 @@ static void thread_func(void *userdata) {
}
/* Hmm, nothing to do. Let's sleep */
if ((ret = pa_rtpoll_run(u->rtpoll, TRUE)) < 0)
#if defined(PA_CHECK_VERSION) && PA_CHECK_VERSION(6, 0, 0)
if ((ret = pa_rtpoll_run(u->rtpoll)) < 0) {
#else
if ((ret = pa_rtpoll_run(u->rtpoll, TRUE)) < 0) {
#endif
goto fail;
}
if (ret == 0)
goto finish;


Loading…
Cancel
Save