[MPlayer-dev-eng] Patch: ao_jack for smoother playback

Ed W lists at wildgooses.com
Wed Jul 27 02:15:14 CEST 2005


>>Can you please see if the attached patch does what you want?
>>    
>>
>
>Applied, with the minor change of making it on by default (I personally
>don't see the difference, but since ao_jack probably has its special
>"customer base" anyway I'll heed their opinion).
>  
>

Sorry for the slow replies... Tons of other things getting in the way at 
the moment.

I am just testing your patch as it exists in cvs and I noticed one 
little bug.  Patch below.  Initial impressions though are that it seems 
very smooth and no problems to note

It does seem to drift quicker than I would expect though?  Seems to be 
making a 2ms jump every second or two.  I will have to get a calculator 
out and see if that's reasonable, but I wonder if we are loosing 
precision somewhere? 

Anyway, seems to be a big improvement - thanks!!

Ed W


Index: ao_jack.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_jack.c,v
retrieving revision 1.13
diff -u -r1.13 ao_jack.c
--- ao_jack.c   26 Jul 2005 10:47:29 -0000      1.13
+++ ao_jack.c   27 Jul 2005 00:11:45 -0000
@@ -186,7 +186,7 @@
   if (estimate) {
     float now = (float)GetTimer() / 1000000.0;
     float diff = callback_time + callback_interval - now;
-    if (diff < 0.002)
+    if (fabs(diff) < 0.002)
       callback_time += callback_interval;
     else
       callback_time = now;




More information about the MPlayer-dev-eng mailing list