[vlc-devel] [PATCH v2 1/7] waveout: remove useless drain

Thomas Guillem thomas at gllm.fr
Wed Mar 13 09:55:49 CET 2019


WaveOutFlush( p_aout, true ) is always called from this function.
---
 modules/audio_output/waveout.c | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/modules/audio_output/waveout.c b/modules/audio_output/waveout.c
index b71fe762bb..b9be127bb6 100644
--- a/modules/audio_output/waveout.c
+++ b/modules/audio_output/waveout.c
@@ -391,27 +391,6 @@ static void Stop( audio_output_t *p_aout )
 
     /* Before calling waveOutClose we must reset the device */
     MMRESULT result = waveOutReset( p_sys->h_waveout );
-    if(result != MMSYSERR_NOERROR)
-    {
-       msg_Err( p_aout, "waveOutReset failed 0x%x", result );
-       /*
-        now we must wait, that all buffers are played
-        because cancel doesn't work in this case...
-       */
-       if(result == MMSYSERR_NOTSUPPORTED)
-       {
-           /*
-             clear currently played (done) buffers,
-             if returnvalue > 0 (means some buffer still playing)
-             wait for the driver event callback that one buffer
-             is finished with playing, and check again
-             the timeout of 5000ms is just, an emergency exit
-             of this loop, to avoid deadlock in case of other
-             (currently not known bugs, problems, errors cases?)
-           */
-            WaveOutFlush( p_aout, true );
-       }
-    }
 
     /* wait for the frames to be queued in cleaning list */
     WaveOutFlush( p_aout, true );
-- 
2.20.1



More information about the vlc-devel mailing list