[MPlayer-dev-eng] ao_plugin assumption about ao driver play()
steve at daviesfam.org
Mon Dec 10 14:33:24 CET 2001
On Mon, 10 Dec 2001, Stephen Davies wrote:
> With that all said, though, I need to think some more about the right
> fix. I don't think I understand the bug properly.
Just saw that ao_oss.c play() cuts the written length to a multiple of the
fragment size. This will be because OSS docs strongly recommend writing
only full fragments if you want to keep sync. DSP_GETODELAY may only have
precision to within one complete fragment...
I also now understand why this doesn't usually cause a problem.
MAX_OUTBURST of 65536 is a multiple of common fragment sizes. As things
start with mplaer.c writing an integral number of fragments (ie,
MAX_OUTBURST), the free space in the oss driver stays as an integral
number of fragments (fragments always become free as a whole).
I adjusted MAX_OUTBURST to 73728 - a multiple of 12288 and 8192, and
solved the underflow problem.
But somehow I don't think that this is a proper fix...
More information about the MPlayer-dev-eng