[vlc-devel] [PATCH 2/4] directsound: remove the broken msleep fallback

Ludovic Fauvet etix at videolan.org
Wed Jul 24 13:00:59 CEST 2013


---
 modules/audio_output/directx.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/modules/audio_output/directx.c b/modules/audio_output/directx.c
index 753fda1..0ab2d40 100644
--- a/modules/audio_output/directx.c
+++ b/modules/audio_output/directx.c
@@ -889,13 +889,9 @@ static void Flush ( audio_output_t * aout, bool drain )
             }
         }
         else
-            while( IDirectSoundBuffer_GetCurrentPosition( aout->sys->p_dsbuffer,(LPDWORD) &read, NULL) ==  DS_OK )
-            {
-                read %= DS_BUF_SIZE;
-                if( read == aout->sys->i_write )
-                    break;
-                msleep(10000);
-            }
+        {
+            IDirectSoundBuffer_Stop( aout->sys->p_dsbuffer );
+        }
     }
     else
     {
-- 
1.8.3.3




More information about the vlc-devel mailing list