[MPlayer-dev-eng] ao_plugin assumption about ao driver play()

Stephen Davies steve at daviesfam.org
Mon Dec 10 13:25:01 CET 2001


On Mon, 10 Dec 2001, Anders Johansson wrote:

> Ok, then it was my mistake. But isn't it possible to rewrite ao_oss so
> that it doesn't lie when get_space() is called? cause if it can only
> take 61440 samples it shouldn't return 65536.

The 65536 is a special case - that's MAX_OUTBURST which is the most data
mplayer.c will ever pass.  I'm not sure why this is required (A'rpi?).  

(For 6 channel audio @ 48kHz, 65536 bytes is only about 1/10th of a second
of audio, so perhaps MAX_OUTBURST should be increased.  Also, I think its
essential that it be adjusted to a value thats a multiple of a complete
set of channel samples in the worst case - the OSS spec requires that
programs always write a complete set).

With that all said, though, I need to think some more about the right
fix.  I don't think I understand the bug properly.

Perhaps its MAX_OUTBURST that's causing the trouble.  Maybe this issue
can be dodged just by making sure ao2 drivers return a number less than
MAX_OUTBURST to get_space.  Then ao_oss can then be sure to return an
exact multiple of the fragment size.  Or, remove MAX_OUTBURST.  Or,
compute it more intelligently.

Steve





More information about the MPlayer-dev-eng mailing list