[vlc-devel] [PATCH 5/6] alsa: remove the drain implementation

Thomas Guillem thomas at gllm.fr
Tue Mar 12 16:23:53 CET 2019


Since it's necessary blocking and synchronous (cf. next commits).

PS: The default drain implementation will be used by the core.
---
 modules/audio_output/alsa.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c
index e1b1e84c55..cdbfd44d41 100644
--- a/modules/audio_output/alsa.c
+++ b/modules/audio_output/alsa.c
@@ -295,7 +295,6 @@ static void Play(audio_output_t *, block_t *, vlc_tick_t);
 static void Pause (audio_output_t *, bool, vlc_tick_t);
 static void PauseDummy (audio_output_t *, bool, vlc_tick_t);
 static void Flush (audio_output_t *);
-static void Drain (audio_output_t *);
 
 /** Initializes an ALSA playback stream */
 static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
@@ -622,7 +621,6 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
         msg_Warn (aout, "device cannot be paused");
     }
     aout->flush = Flush;
-    aout->drain = Drain;
     aout_SoftVolumeStart (aout);
     return 0;
 
@@ -729,16 +727,6 @@ static void Flush (audio_output_t *aout)
     snd_pcm_prepare (pcm);
 }
 
-/**
- * Drains the audio playback buffer.
- */
-static void Drain (audio_output_t *aout)
-{
-    aout_sys_t *p_sys = aout->sys;
-    snd_pcm_t *pcm = p_sys->pcm;
-    snd_pcm_drain (pcm);
-}
-
 /**
  * Releases the audio output.
  */
-- 
2.20.1



More information about the vlc-devel mailing list