[vlc-commits] directsound: fix inverted logic (fix #9195)

Ludovic Fauvet git at videolan.org
Mon Aug 26 14:54:10 CEST 2013


vlc | branch: master | Ludovic Fauvet <etix at videolan.org> | Mon Aug 26 14:47:43 2013 +0200| [b5c8fd2667278c8ac9ef05d4b0874aee90fea982] | committer: Ludovic Fauvet

directsound: fix inverted logic (fix #9195)

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

 modules/audio_output/directx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/audio_output/directx.c b/modules/audio_output/directx.c
index ec6504c..48f3251 100644
--- a/modules/audio_output/directx.c
+++ b/modules/audio_output/directx.c
@@ -676,7 +676,7 @@ static int FillBuffer( audio_output_t *p_aout, block_t *p_buffer )
     if( IDirectSoundBuffer_GetCurrentPosition( p_aout->sys->p_dsbuffer, (LPDWORD) &i_read, NULL) ==  DS_OK )
     {
         /* Compute the outer interval between the write and read pointers within the ring buffer */
-        i_buf = (mtime_t)p_aout->sys->i_write - (mtime_t)i_read;
+        i_buf = (mtime_t)i_read - (mtime_t)p_aout->sys->i_write;
         if( i_buf <= 0 )
             i_buf += DS_BUF_SIZE;
     }



More information about the vlc-commits mailing list