pulseaudio 0.9.13 was released on 2009-09-10. All our supported
distros have it.
PA_*_IS_GOOD are from 0.9.11.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
meson.build | 2 +-
audio/paaudio.c | 28 ++--------------------------
2 files changed, 3 insertions(+), 27 deletions(-)
diff --git a/meson.build b/meson.build
index 2d114e90184..fb89fbd1cc5 100644
--- a/meson.build
+++ b/meson.build
@@ -1283,7 +1283,7 @@ endif
pulse = not_found
if not get_option('pa').auto() or (host_os == 'linux' and have_system)
- pulse = dependency('libpulse', required: get_option('pa'),
+ pulse = dependency('libpulse', version: '>=0.9.13', required: get_option('pa'),
method: 'pkg-config')
endif
alsa = not_found
diff --git a/audio/paaudio.c b/audio/paaudio.c
index 0c06a397195..88c7c286689 100644
--- a/audio/paaudio.c
+++ b/audio/paaudio.c
@@ -54,26 +54,6 @@ static void G_GNUC_PRINTF (2, 3) qpa_logerr (int err, const char *fmt, ...)
AUD_log (AUDIO_CAP, "Reason: %s\n", pa_strerror (err));
}
-#ifndef PA_CONTEXT_IS_GOOD
-static inline int PA_CONTEXT_IS_GOOD(pa_context_state_t x)
-{
- return
- x == PA_CONTEXT_CONNECTING ||
- x == PA_CONTEXT_AUTHORIZING ||
- x == PA_CONTEXT_SETTING_NAME ||
- x == PA_CONTEXT_READY;
-}
-#endif
-
-#ifndef PA_STREAM_IS_GOOD
-static inline int PA_STREAM_IS_GOOD(pa_stream_state_t x)
-{
- return
- x == PA_STREAM_CREATING ||
- x == PA_STREAM_READY;
-}
-#endif
-
#define CHECK_SUCCESS_GOTO(c, expression, label, msg) \
do { \
if (!(expression)) { \
@@ -671,9 +651,7 @@ static void qpa_volume_out(HWVoiceOut *hw, Volume *vol)
PAConnection *c = pa->g->conn;
int i;
-#ifdef PA_CHECK_VERSION /* macro is present in 0.9.16+ */
- pa_cvolume_init (&v); /* function is present in 0.9.13+ */
-#endif
+ pa_cvolume_init(&v);
v.channels = vol->channels;
for (i = 0; i < vol->channels; ++i) {
@@ -713,9 +691,7 @@ static void qpa_volume_in(HWVoiceIn *hw, Volume *vol)
PAConnection *c = pa->g->conn;
int i;
-#ifdef PA_CHECK_VERSION
- pa_cvolume_init (&v);
-#endif
+ pa_cvolume_init(&v);
v.channels = vol->channels;
for (i = 0; i < vol->channels; ++i) {
--
2.52.0