diff options
author | Michael Roitzsch <mroi@users.sourceforge.net> | 2004-04-07 18:07:25 +0000 |
---|---|---|
committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2004-04-07 18:07:25 +0000 |
commit | 25bbdcdc14a1a470c405882368ff9466ba418b6e (patch) | |
tree | 4deafd992e845543e5fa6a8948a09a38bf7fd664 | |
parent | 325ccefb54068a4eda0700ec828ccedf9a3a975e (diff) | |
download | xine-lib-25bbdcdc14a1a470c405882368ff9466ba418b6e.tar.gz xine-lib-25bbdcdc14a1a470c405882368ff9466ba418b6e.tar.bz2 |
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
-rw-r--r-- | src/xine-engine/audio_out.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 <andy@alsaplayer.org> @@ -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; |