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

Ed W lists at wildgooses.com
Thu Jul 21 17:38:38 CEST 2005


Reimar Döffinger wrote:

>On Sat, Jul 09, 2005 at 10:15:43PM +0200, Reimar D?ffinger wrote:
>  
>
>>I wanted it to merge with my local changes (attached), but didn't get
>>around to it...
>>The merging would essentially consist of replacing my estimation code in
>>the callback with yours (or maybe even keeping both, whatever).
>>    
>>
>
>Can you please see if the attached patch does what you want?
>  
>

Sorry for the long delay - I didn't notice your reply (durr).

Just eyeballing the patch I think it might work OK.  However, I'm still 
not sure you are addressing my point that you will *need* some kind of 
estimation code *all* the time?  Can we argue that issue out a little 
first and then get back to the code?

What the current (non-estimation) code does is give an audio delay 
measurement which is quantised into blocks the size of the underlying 
Jack buffer size.  In my testing here with reasonable sized buffers this 
gives extremely jerky playback (and it's something which annoyed me 
enough in the past with my RME9632 audio card + alsa + mplayer that in 
the end I fixed the audio driver to make it give the proper audio delay 
- and that was only a 512 sample quantisation)

So I am claiming that the quick and dirty method is to at least use the 
elapsed delay since the last callback interval to estimate the audio 
delay - but the preferred method is also to de-jitter the callback 
intervals (algorithm up for debate, but your suggested one looks fine) 
so that the delay is as consistent as possible.  ie I don't notice the 
odd minor frame jerk every few mins, but I do notice twitches that occur 
every few frames.

Anyway, I will test out your changes, but just wanted to thrash out the 
*NEED* for the estimation code first.  Can you post your objections to 
the above argument so that at least I understand your position on making 
it a variable?

Thanks for your excellent work on this Reimar!

Ed W




More information about the MPlayer-dev-eng mailing list