aout: rename back drain_async to drain

Now that the legacy implementation is gone.
This commit is contained in:
Thomas Guillem 2022-01-14 21:27:28 +01:00 committed by Rémi Denis-Courmont
parent 193ab0d027
commit 6c93cb0f04
7 changed files with 9 additions and 9 deletions

View File

@ -245,7 +245,7 @@ struct audio_output
* \note This callback cannot be called in stopped state.
*/
void (*drain_async)(audio_output_t *);
void (*drain)(audio_output_t *);
/**< Drain the playback buffers asynchronously (can be NULL).
*
* A drain operation can be cancelled by aout->flush() or aout->stop().

View File

@ -862,7 +862,7 @@ static int Open(vlc_object_t *obj)
aout->time_get = TimeGet;
aout->play = Play;
aout->flush = Flush;
aout->drain_async = Drain;
aout->drain = Drain;
return VLC_SUCCESS;
error:

View File

@ -376,7 +376,7 @@ static int Open (vlc_object_t *obj)
aout->play = Play;
aout->pause = Pause;
aout->flush = Flush;
aout->drain_async = sys->drain ? Drain : NULL;
aout->drain = sys->drain ? Drain : NULL;
if (sys->set_volume != NULL)
{
aout->volume_set = VolumeSet;

View File

@ -1076,7 +1076,7 @@ static int Open(vlc_object_t *obj)
aout->play = Play;
aout->pause = Pause;
aout->flush = Flush;
aout->drain_async = Drain;
aout->drain = Drain;
aout->volume_set = VolumeSet;
aout->mute_set = MuteSet;
aout->device_select = StreamMove;

View File

@ -178,7 +178,7 @@ static int Start( audio_output_t *p_aout, audio_sample_format_t *restrict fmt )
p_aout->play = Play;
p_aout->pause = WaveOutPause;
p_aout->flush = WaveOutFlush;
p_aout->drain_async = WaveOutDrainAsync;
p_aout->drain = WaveOutDrainAsync;
aout_sys_t *sys = p_aout->sys;

View File

@ -971,7 +971,7 @@ static int OpenAudio(vlc_object_t *p_this)
aout->play = PlayAudio;
aout->start = Start;
aout->flush = Flush;
aout->drain_async = Drain;
aout->drain = Drain;
aout->time_get = TimeGet;
aout->pause = aout_PauseDefault;

View File

@ -587,7 +587,7 @@ bool aout_DecIsDrained(audio_output_t *aout)
{
aout_owner_t *owner = aout_owner (aout);
if (aout->drain_async == NULL)
if (aout->drain == NULL)
{
vlc_tick_t drain_deadline =
atomic_load_explicit(&owner->drain_deadline, memory_order_relaxed);
@ -612,11 +612,11 @@ void aout_DecDrain(audio_output_t *aout)
aout->play(aout, block, vlc_tick_now());
}
if (aout->drain_async)
if (aout->drain)
{
assert(!atomic_load_explicit(&owner->drained, memory_order_relaxed));
aout->drain_async(aout);
aout->drain(aout);
}
else
{