[vlc-commits] waveout: remove useless drain
Thomas Guillem
git at videolan.org
Tue Mar 19 16:03:09 CET 2019
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Mar 12 14:32:56 2019 +0100| [c91da3d1911292675fa225ec9fd24ae1473f6320] | committer: Thomas Guillem
waveout: remove useless drain
WaveOutFlush( p_aout, true ) is always called from this function.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c91da3d1911292675fa225ec9fd24ae1473f6320
---
modules/audio_output/waveout.c | 23 +----------------------
1 file changed, 1 insertion(+), 22 deletions(-)
diff --git a/modules/audio_output/waveout.c b/modules/audio_output/waveout.c
index b71fe762bb..f2ddf42f7a 100644
--- a/modules/audio_output/waveout.c
+++ b/modules/audio_output/waveout.c
@@ -390,28 +390,7 @@ static void Stop( audio_output_t *p_aout )
aout_sys_t *p_sys = p_aout->sys;
/* 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 );
- }
- }
+ waveOutReset( p_sys->h_waveout );
/* wait for the frames to be queued in cleaning list */
WaveOutFlush( p_aout, true );
More information about the vlc-commits
mailing list