From 25bbdcdc14a1a470c405882368ff9466ba418b6e Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Wed, 7 Apr 2004 18:07:25 +0000 Subject: the patch to audio_out from 1.128 to 1.129 changed a calculation from x = a / b + c to y = b + c x = a / y which is wrong and breaks the resampling sync method; changing to y = a / b x = y + c should fix; thanks to Carsten Weinhold for the patch CVS patchset: 6341 CVS date: 2004/04/07 18:07:25 --- src/xine-engine/audio_out.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index fd258f844..9247e3411 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -17,7 +17,7 @@ * along with self program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_out.c,v 1.170 2004/04/05 20:01:27 hadess Exp $ + * $Id: audio_out.c,v 1.171 2004/04/07 18:07:25 mroi Exp $ * * 22-8-2001 James imported some useful AC3 sections from the previous alsa driver. * (c) 2001 Andy Lo A Foe @@ -871,8 +871,8 @@ static int resample_rate_adjust(aos_t *this, int64_t gap, audio_buffer_t *buf) { #endif /* we want to add factor * num_frames to each buffer */ diff = gap_diff; - duration = (int64_t)info->window_duration + (int64_t)info->last_factor; - factor = diff / duration; + duration = info->window_duration; + factor = diff / duration + info->last_factor; info->last_factor = factor; this->resample_sync_factor = 1.0 + factor; -- cgit v1.2.3