From 66075dcfc8c099096877d82969a6170ccd3e91e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= Date: Thu, 21 Jul 2011 21:01:38 +0300 Subject: [PATCH] PulseAudio: reuse the nwe vlc_aout.h defines --- modules/audio_output/pulse.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c index ba6c01e544..bb557e20b3 100644 --- a/modules/audio_output/pulse.c +++ b/modules/audio_output/pulse.c @@ -140,10 +140,6 @@ static void stream_state_cb(pa_stream *s, void *userdata) } /* Latency management and lip synchronization */ -/* Values from EBU R37 */ -#define AOUT_EARLY_TOLERANCE 40000 -#define AOUT_LATE_TOLERANCE 60000 - static void stream_latency_cb(pa_stream *s, void *userdata) { aout_instance_t *aout = userdata; @@ -182,11 +178,11 @@ static void stream_latency_cb(pa_stream *s, void *userdata) /* NOTE: AOUT_MAX_RESAMPLING (10%) is way too high... */ const int limit = inrate >> 6; - if (delta < -AOUT_LATE_TOLERANCE) { + if (delta < -AOUT_MAX_PTS_DELAY) { msg_Warn(aout, "too late by %"PRId64" us", -delta); if (change < 0) delta += change; /* be more severe if really out of sync */ - } else if (delta > +AOUT_EARLY_TOLERANCE) { + } else if (delta > +AOUT_MAX_PTS_ADVANCE) { msg_Warn(aout, "too early by %"PRId64" us", delta); if (change > 0) delta += change;