]> git.sesse.net Git - vlc/blobdiff - src/audio_output/aout_u8.c
* Filter plugins. Not very polished (please don't look at how the dates are
[vlc] / src / audio_output / aout_u8.c
index 2a863fda1945d4d456750d156955d56c5005f9ae..f34c858644164dc67ebf9e76a15faff7b95708dc 100644 (file)
@@ -2,7 +2,7 @@
  * aout_u8.c: 8 bit unsigned audio output functions
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: aout_u8.c,v 1.7 2001/11/28 15:08:06 massiot Exp $
+ * $Id: aout_u8.c,v 1.9 2001/12/07 18:33:08 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *
@@ -30,7 +30,6 @@
 #include <stdlib.h>                            /* calloc(), malloc(), free() */
 #include <string.h>
 
-#include "config.h"
 #include "common.h"
 #include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
 #include "threads.h"
@@ -84,7 +83,8 @@ void aout_U8MonoThread( aout_thread_t * p_aout )
         l_bytes = p_aout->pf_getbufinfo( p_aout, l_buffer_limit );
         /* sizeof(u8) << (p_aout->b_stereo) == 1 */
         p_aout->date = mdate() + ((((mtime_t)((l_bytes + 4 * p_aout->i_latency) / 1)) * 1000000)
-                                   / ((mtime_t)p_aout->l_rate));
+                                   / ((mtime_t)p_aout->l_rate))
+                        + p_main->i_desync;
  
         p_aout->pf_play( p_aout, (byte_t *)p_aout->buffer, l_buffer_limit * sizeof(u8) );
         if ( l_bytes > (l_buffer_limit * sizeof(u8) * 2) ) /* There are 2 channels (left & right) */
@@ -138,7 +138,8 @@ void aout_U8StereoThread( aout_thread_t * p_aout )
         l_bytes = p_aout->pf_getbufinfo( p_aout, l_buffer_limit );
         /* sizeof(u8) << (p_aout->b_stereo) == 2 */
         p_aout->date = mdate() + ((((mtime_t)((l_bytes + 4 * p_aout->i_latency) / 2)) * 1000000)
-                                   / ((mtime_t)p_aout->l_rate));
+                                   / ((mtime_t)p_aout->l_rate))
+                        + p_main->i_desync;
  
         p_aout->pf_play( p_aout, (byte_t *)p_aout->buffer, l_buffer_limit * sizeof(u8) );
         if ( l_bytes > (l_buffer_limit * sizeof(u8)) )