]> git.sesse.net Git - vlc/commitdiff
wasapi: sleep for half a period as hinted in MSDN
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 12 Mar 2014 20:05:16 +0000 (22:05 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 12 Mar 2014 20:05:16 +0000 (22:05 +0200)
modules/audio_output/wasapi.c

index 734962b03ee58c164c17016ed78e2432cf4b82d0..243971e726ee9177a3f1f25bb74e962ab149a1ec 100644 (file)
@@ -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: