[MPlayer-dev-eng] Patch: Low latency audio enhancements

Attila Kinali attila at kinali.ch
Sat Sep 11 15:14:30 CEST 2004


On Mon, Sep 06, 2004 at 04:32:56PM +0100, Ed Wildgoose wrote:
 
> Agreed.  However, neither of the above should happen.  All we are doing 
> is trying to emulate the same flow of control as would happen if we had 
> larger audio buffers.  Currently if your audio buffers are smaller than 
> about 4096 samples then you are stuffed, mplayer just doesnt work 
> because the video code insists on sleeping until the frame becomes due 
> and you run out of audio.  The patch basically just says don't sleep for 
> as long and instead go back up to the top of the code and add some more 
> audio.

BTW: what happens if the video decoding and display time is bigger then
the time we have from one audio buffer fill ?

> This still leaves me with juddery video though.  My audio card driver 
> only reports how many buffers are empty, not the exact audio position.  
> -autosync is not working well for me either.  I'm going to fix this with 
> a patch to the audio drivers which tries to detect this situation and 
> then starts using clock ticks to estimate current audio position rather 
> than relying on the output of the alsa free space api call.  I guess on 
> average I will be out of sync by about half an audio buffer, but at 
> least it will be smooth and consistent - tell me you can spot a 2ms 
> frame desync anyway!!

I have good eyes and ears ;)

> ...patch for the above to follow shortly...

Waiting for it :)

			Attila Kinali




More information about the MPlayer-dev-eng mailing list