int aout_DecGetResetLost(audio_output_t *);
void aout_DecChangePause(audio_output_t *, bool b_paused, mtime_t i_date);
void aout_DecFlush(audio_output_t *, bool wait);
-bool aout_DecIsEmpty(audio_output_t *);
void aout_RequestRestart (audio_output_t *, unsigned);
static inline void aout_InputRequestRestart(audio_output_t *aout)
aout_OutputFlush (aout, wait);
aout_OutputUnlock (aout);
}
-
-bool aout_DecIsEmpty (audio_output_t *aout)
-{
- aout_owner_t *owner = aout_owner (aout);
- mtime_t now = mdate ();
- bool empty = true;
-
- aout_OutputLock (aout);
- if (owner->sync.end != VLC_TS_INVALID)
- empty = owner->sync.end <= now;
- if (empty && owner->mixer_format.i_format)
- /* The last PTS has elapsed already. So the underlying audio output
- * buffer should be empty or almost. Thus draining should be fast
- * and will not block the caller too long. */
- aout_OutputFlush (aout, true);
- aout_OutputUnlock (aout);
- return empty;
-}