From 4a8716aa01b5a91f82b6b6af1f0576e7b307e471 Mon Sep 17 00:00:00 2001 From: Thibaut Mattern Date: Wed, 19 Jun 2002 23:45:50 +0000 Subject: Fix the resume problem introduced by flushing audio_out buffers. CVS patchset: 2100 CVS date: 2002/06/19 23:45:50 --- src/xine-engine/audio_out.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index 34475c17f..4933eff72 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.57 2002/06/12 12:22:38 f1rmb Exp $ + * $Id: audio_out.c,v 1.58 2002/06/19 23:45:50 tmattern Exp $ * * 22-8-2001 James imported some useful AC3 sections from the previous alsa driver. * (c) 2001 Andy Lo A Foe @@ -318,8 +318,10 @@ static void *ao_loop (void *this_gen) { paused_wait = (this->audio_paused == 2) || (this->audio_paused && gap > this->gap_tolerance); - if ( paused_wait ) + if ( paused_wait ) { + this->metronom->allow_full_ao_fill_gap = 1; xine_usec_sleep (50000); + } } while ( paused_wait ); #ifdef LOG @@ -359,7 +361,13 @@ static void *ao_loop (void *this_gen) { /* for big gaps output silence */ if ( gap > AO_MAX_GAP ) { - ao_fill_gap (this, gap/2); + printf ("audio_out: ao_fill_gap\n"); + if (this->metronom->allow_full_ao_fill_gap) { + ao_fill_gap (this, gap); + this->metronom->allow_full_ao_fill_gap = 0; + } else { + ao_fill_gap (this, gap / 2); + } } /* -- cgit v1.2.3