Commit 024ca98d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

aout: make flush operation mandatory

parent fc81dcfa
......@@ -169,7 +169,7 @@ struct audio_output
* \note A stream must have been started when called.
*/
void (*flush)( audio_output_t *, bool wait);
/**< Flushes or drains the playback buffers (optional, may be NULL).
/**< Flushes or drains the playback buffers (mandatoryl, cannot be NULL).
* \param wait true to wait for playback of pending buffers (drain),
* false to discard pending buffers (flush)
* \note A stream must have been started when called.
......
......@@ -48,6 +48,11 @@ static void Play(audio_output_t *aout, block_t *block)
(void) aout;
}
static void Flush(audio_output_t *aout, bool wait)
{
(void) aout; (void) wait;
}
static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)
{
if (AOUT_FMT_SPDIF(fmt) && var_InheritBool(aout, "spdif"))
......@@ -70,7 +75,7 @@ static int Open(vlc_object_t *obj)
aout->time_get = NULL;
aout->play = Play;
aout->pause = NULL;
aout->flush = NULL;
aout->flush = Flush;
aout->stop = NULL;
aout->volume_set = NULL;
aout->mute_set = NULL;
......
......@@ -449,7 +449,5 @@ void aout_OutputPause( audio_output_t *aout, bool pause, mtime_t date )
void aout_OutputFlush( audio_output_t *aout, bool wait )
{
aout_assert_locked( aout );
if( aout->flush != NULL )
aout->flush( aout, wait );
aout->flush (aout, wait);
}
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