* output.c : internal management of output streams for the audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: output.c,v 1.38 2003/05/04 22:42:17 gbazin Exp $
+ * $Id: output.c,v 1.41 2003/07/09 21:42:28 gbazin Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
text.psz_string = _("Stereo");
}
var_Change( p_aout, "audio-channels", VLC_VAR_ADDCHOICE, &val, &text );
- val.i_int = AOUT_VAR_CHAN_LEFT; text.i_int = _("Left");
+ val.i_int = AOUT_VAR_CHAN_LEFT; text.psz_string = _("Left");
var_Change( p_aout, "audio-channels", VLC_VAR_ADDCHOICE, &val, &text );
val.i_int = AOUT_VAR_CHAN_RIGHT; text.psz_string = _("Right");
var_Change( p_aout, "audio-channels", VLC_VAR_ADDCHOICE, &val, &text );
vlc_mutex_lock( &p_aout->output_fifo_lock );
p_buffer = p_aout->output.fifo.p_first;
- while ( p_buffer && p_buffer->start_date < mdate() )
+ while ( p_buffer && p_buffer->start_date < mdate() - AOUT_PTS_TOLERANCE )
{
msg_Dbg( p_aout, "audio output is too slow ("I64Fd"), "
"trashing "I64Fd"us", mdate() - p_buffer->start_date,
* generally true, and anyway if it's wrong it won't be a disaster. */
if ( p_buffer->start_date > start_date
+ (p_buffer->end_date - p_buffer->start_date) )
+ /*
+ * + AOUT_PTS_TOLERANCE )
+ * There is no reason to want that, it just worsen the scheduling of
+ * an audio sample after an output starvation (ie. on start or on resume)
+ * --Gibalou
+ */
{
vlc_mutex_unlock( &p_aout->output_fifo_lock );
if ( !p_aout->output.b_starving )