Commit 274f047a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

aout: rename aout_FifoSet() to aout_FifoReset()

The date parameter is always zero, remove it.
parent f9c766b9
...@@ -135,7 +135,7 @@ void aout_FifoInit( vlc_object_t *, aout_fifo_t *, uint32_t ); ...@@ -135,7 +135,7 @@ void aout_FifoInit( vlc_object_t *, aout_fifo_t *, uint32_t );
#define aout_FifoInit(o, f, r) aout_FifoInit(VLC_OBJECT(o), f, r) #define aout_FifoInit(o, f, r) aout_FifoInit(VLC_OBJECT(o), f, r)
mtime_t aout_FifoNextStart( const aout_fifo_t * ) VLC_USED; mtime_t aout_FifoNextStart( const aout_fifo_t * ) VLC_USED;
void aout_FifoPush( aout_fifo_t *, aout_buffer_t * ); void aout_FifoPush( aout_fifo_t *, aout_buffer_t * );
void aout_FifoSet( aout_fifo_t *, mtime_t ); void aout_FifoReset( aout_fifo_t * );
void aout_FifoMoveDates( aout_fifo_t *, mtime_t ); void aout_FifoMoveDates( aout_fifo_t *, mtime_t );
void aout_FifoDestroy( aout_fifo_t * p_fifo ); void aout_FifoDestroy( aout_fifo_t * p_fifo );
void aout_FormatsPrint( audio_output_t * p_aout, const char * psz_text, const audio_sample_format_t * p_format1, const audio_sample_format_t * p_format2 ); void aout_FormatsPrint( audio_output_t * p_aout, const char * psz_text, const audio_sample_format_t * p_format1, const audio_sample_format_t * p_format2 );
......
...@@ -363,14 +363,13 @@ void aout_FifoPush( aout_fifo_t * p_fifo, aout_buffer_t * p_buffer ) ...@@ -363,14 +363,13 @@ void aout_FifoPush( aout_fifo_t * p_fifo, aout_buffer_t * p_buffer )
} }
/***************************************************************************** /*****************************************************************************
* aout_FifoSet : set end_date and trash all buffers (because they aren't * aout_FifoReset: trash all buffers
* properly dated)
*****************************************************************************/ *****************************************************************************/
void aout_FifoSet( aout_fifo_t * p_fifo, mtime_t date ) void aout_FifoReset( aout_fifo_t * p_fifo )
{ {
aout_buffer_t * p_buffer; aout_buffer_t * p_buffer;
date_Set( &p_fifo->end_date, date ); date_Set( &p_fifo->end_date, 0 );
p_buffer = p_fifo->p_first; p_buffer = p_fifo->p_first;
while ( p_buffer != NULL ) while ( p_buffer != NULL )
{ {
......
...@@ -241,7 +241,7 @@ void aout_DecChangePause( audio_output_t *p_aout, aout_input_t *p_input, bool b_ ...@@ -241,7 +241,7 @@ void aout_DecChangePause( audio_output_t *p_aout, aout_input_t *p_input, bool b_
void aout_DecFlush( audio_output_t *p_aout, aout_input_t *p_input ) void aout_DecFlush( audio_output_t *p_aout, aout_input_t *p_input )
{ {
aout_lock( p_aout ); aout_lock( p_aout );
aout_FifoSet( &p_input->fifo, 0 ); aout_FifoReset( &p_input->fifo );
aout_unlock( p_aout ); aout_unlock( p_aout );
} }
......
...@@ -549,8 +549,8 @@ void aout_InputPlay( audio_output_t * p_aout, aout_input_t * p_input, ...@@ -549,8 +549,8 @@ void aout_InputPlay( audio_output_t * p_aout, aout_input_t * p_input,
* happen :). */ * happen :). */
msg_Warn( p_aout, "computed PTS is out of range (%"PRId64"), " msg_Warn( p_aout, "computed PTS is out of range (%"PRId64"), "
"clearing out", now - start_date ); "clearing out", now - start_date );
aout_FifoSet( &p_input->fifo, 0 ); aout_FifoReset( &p_input->fifo );
aout_FifoSet( &p_aout->fifo, 0 ); aout_FifoReset( &p_aout->fifo );
if ( p_input->i_resampling_type != AOUT_RESAMPLING_NONE ) if ( p_input->i_resampling_type != AOUT_RESAMPLING_NONE )
msg_Warn( p_aout, "timing screwed, stopping resampling" ); msg_Warn( p_aout, "timing screwed, stopping resampling" );
inputResamplingStop( p_input ); inputResamplingStop( p_input );
...@@ -580,7 +580,7 @@ void aout_InputPlay( audio_output_t * p_aout, aout_input_t * p_input, ...@@ -580,7 +580,7 @@ void aout_InputPlay( audio_output_t * p_aout, aout_input_t * p_input,
{ {
msg_Warn( p_aout, "buffer way too early (%"PRId64"), clearing queue", msg_Warn( p_aout, "buffer way too early (%"PRId64"), clearing queue",
drift ); drift );
aout_FifoSet( &p_input->fifo, 0 ); aout_FifoReset( &p_input->fifo );
if ( p_input->i_resampling_type != AOUT_RESAMPLING_NONE ) if ( p_input->i_resampling_type != AOUT_RESAMPLING_NONE )
msg_Warn( p_aout, "timing screwed, stopping resampling" ); msg_Warn( p_aout, "timing screwed, stopping resampling" );
inputResamplingStop( p_input ); inputResamplingStop( p_input );
......
...@@ -173,7 +173,7 @@ static int MixBuffer( audio_output_t * p_aout, float volume ) ...@@ -173,7 +173,7 @@ static int MixBuffer( audio_output_t * p_aout, float volume )
if( delta < 0 ) if( delta < 0 )
{ {
/* Is it really the best way to do it ? */ /* Is it really the best way to do it ? */
aout_FifoSet( &p_aout->fifo, 0 ); aout_FifoReset( &p_aout->fifo );
return -1; return -1;
} }
if( delta > 0 ) if( delta > 0 )
......
...@@ -385,7 +385,7 @@ aout_buffer_t * aout_OutputNextBuffer( audio_output_t * p_aout, ...@@ -385,7 +385,7 @@ aout_buffer_t * aout_OutputNextBuffer( audio_output_t * p_aout,
* to deal with this kind of starvation. */ * to deal with this kind of starvation. */
/* Set date to 0, to allow the mixer to send a new buffer ASAP */ /* Set date to 0, to allow the mixer to send a new buffer ASAP */
aout_FifoSet( &p_aout->fifo, 0 ); aout_FifoReset( &p_aout->fifo );
if ( !p_aout->b_starving ) if ( !p_aout->b_starving )
msg_Dbg( p_aout, msg_Dbg( p_aout,
"audio output is starving (no input), playing silence" ); "audio output is starving (no input), playing silence" );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment