[MPlayer-dev-eng] [RFC] hack around desync on OSS pause

Rich Felker dalias at aerifal.cx
Sun Apr 29 03:02:58 CEST 2007


On Sun, Apr 29, 2007 at 02:07:09AM +0200, Reimar Döffinger wrote:
> Hello,
> On Sun, Apr 29, 2007 at 01:32:43AM +0300, Ivan Kalvachev wrote:
> > 2007/4/29, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
> > > what do you think about attached patch? It fixes the massive desync that
> > > happens esp. when doing lots of frame stepping with -ao oss.
> > > It is a bit hackish though, and in difference to alsa it will still loose some
> > > sound during pause and not play any sound while framestepping.
> > 
> > I've always thought that the problem is that we actually close the
> > device on pause, instead using the proper ctrl to actually pause it.
> 
> According to the documentation I saw there is no functionality to pause
> in OSS, with some stupid argumentation from someone who probably never
> actually used it for anything beyond his 50-line-my-own-music-player...

The functionality is not needed in the driver. Just make ao_oss keep a
copy of whatever audio it's submitted, and on pause, check the current
delay/position in the buffer, then resubmit those samples after
unpause.

Or if you just care about the desync issue with multiple framesteps,
fix mplayer.c so that it doesn't decode/submit audio at all when the
audio timer is ahead of the video timer.

Rich



More information about the MPlayer-dev-eng mailing list