[vlc-commits] wasapi: sleep for half a period as hinted in MSDN

Rémi Denis-Courmont git at videolan.org
Wed Mar 12 21:45:12 CET 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Mar 12 22:05:16 2014 +0200| [889b477b0a66b06a2b0cf49f9e02646c6b111698] | committer: Rémi Denis-Courmont

wasapi: sleep for half a period as hinted in MSDN

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=889b477b0a66b06a2b0cf49f9e02646c6b111698
---

 modules/audio_output/wasapi.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/audio_output/wasapi.c b/modules/audio_output/wasapi.c
index 734962b..243971e 100644
--- a/modules/audio_output/wasapi.c
+++ b/modules/audio_output/wasapi.c
@@ -180,8 +180,7 @@ static HRESULT Play(aout_stream_t *s, block_t *block)
             break; /* done */
 
         /* Out of buffer space, sleep */
-        msleep(AOUT_MIN_PREPARE_TIME
-             + block->i_nb_samples * CLOCK_FREQ / sys->rate);
+        msleep(sys->frames * (CLOCK_FREQ / 2) / sys->rate);
     }
     IAudioRenderClient_Release(render);
 out:



More information about the vlc-commits mailing list