From 77d9e4b8a9286bc6dcd5f5d4c073351a9033def0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 26 Jul 2014 22:40:27 +0200 Subject: ao_pulse: remove hacks for ancient PulseAudio versions This was needed by very old (0.9) versions only. Get rid of it. Unfortunately, I can't cross-check with the original bug report, since the bug URL leads to this: Internal Server Error TracError: IOError: [Errno 2] No such file or directory: '/home/lennart/svn/trac/pulseaudio/VERSION' --- audio/out/ao_pulse.c | 21 --------------------- old-configure | 2 +- wscript | 2 +- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/audio/out/ao_pulse.c b/audio/out/ao_pulse.c index 3ce11008ff..d0af2a856c 100644 --- a/audio/out/ao_pulse.c +++ b/audio/out/ao_pulse.c @@ -53,7 +53,6 @@ struct priv { // temporary during control() struct pa_sink_input_info pi; - bool broken_pause; int retval; // for wakeup handling @@ -280,26 +279,12 @@ static int init(struct ao *ao) struct priv *priv = ao->priv; char *host = priv->cfg_host && priv->cfg_host[0] ? priv->cfg_host : NULL; char *sink = priv->cfg_sink && priv->cfg_sink[0] ? priv->cfg_sink : NULL; - const char *version = pa_get_library_version(); pthread_mutex_init(&priv->wakeup_lock, NULL); pthread_cond_init(&priv->wakeup, NULL); ao->per_application_mixer = true; - priv->broken_pause = false; - /* not sure which versions are affected, assume 0.9.11* to 0.9.14* - * known bad: 0.9.14, 0.9.13 - * known good: 0.9.9, 0.9.10, 0.9.15 - * To test: pause, wait ca. 5 seconds, framestep and see if MPlayer - * hangs somewhen. */ - if (strncmp(version, "0.9.1", 5) == 0 && version[5] >= '1' - && version[5] <= '4') { - MP_WARN(ao, "working around probably broken pause functionality,\n" - " see http://www.pulseaudio.org/ticket/440\n"); - priv->broken_pause = true; - } - if (!(priv->mainloop = pa_threaded_mainloop_new())) { MP_ERR(ao, "Failed to allocate main loop\n"); goto fail; @@ -465,12 +450,6 @@ static void pause(struct ao *ao) // Resume the audio stream by uncorking it on the server static void resume(struct ao *ao) { - struct priv *priv = ao->priv; - /* Without this, certain versions will cause an infinite hang because - * pa_stream_writable_size returns 0 always. - * Note that this workaround causes A-V desync after pause. */ - if (priv->broken_pause) - reset(ao); cork(ao, false); } diff --git a/old-configure b/old-configure index a57be03a56..063240bcbf 100755 --- a/old-configure +++ b/old-configure @@ -720,7 +720,7 @@ check_statement_libs "RSound" $_rsound RSOUND rsound.h 'rsd_init(NULL);' -lrsoun check_statement_libs "sndio" $_sndio SNDIO sndio.h 'struct sio_par par; sio_initpar(&par); const char *s = SIO_DEVANY' -lsndio -check_pkg_config "PulseAudio" $_pulse PULSE 'libpulse >= 0.9' +check_pkg_config "PulseAudio" $_pulse PULSE 'libpulse >= 1.0' check_pkg_config "PortAudio" $_portaudio PORTAUDIO 'portaudio-2.0 >= 19' diff --git a/wscript b/wscript index 080ef7f1cf..148432dabd 100644 --- a/wscript +++ b/wscript @@ -479,7 +479,7 @@ audio_output_features = [ }, { 'name': '--pulse', 'desc': 'PulseAudio audio output', - 'func': check_pkg_config('libpulse', '>= 0.9') + 'func': check_pkg_config('libpulse', '>= 1.0') }, { 'name': '--portaudio', 'desc': 'PortAudio audio output', -- cgit v1.2.3