[MPlayer-dev-eng] [PATCH] Add audio support for sndio API.

Alexandre Ratchov alex at caoua.org
Wed Dec 11 10:31:36 CET 2013


On Wed, Dec 11, 2013 at 09:39:55AM +0100, Reimar Döffinger wrote:
> On 10.12.2013, at 23:45, Alexandre Ratchov <alex at caoua.org> wrote:
> > On Mon, Dec 09, 2013 at 11:11:18PM +0100, Reimar Döffinger wrote:
> >> 
> >> The no sound issue was a VirtualBox misconfiguration.
> >> So -ao oss now works perfectly, but -ao sndio only hangs
> >> without even making a beep (though accepting some data
> >> at first, around 40k of 80k offered).
> > 
> > Virtual machines are known to have broken sound on OpenBSD :(
> 
> Problem is, sound isn't broken, OSS works fine.

no it doesn't. It might work in one particular case, with one
device but the openbsd implementatino is broken in thousand of
other cases/devices.

> If OSS can work, why would sndio just hang?

probably because nobody uses audio on VMs, so nobody cares about
fixing the driver to work with the emulated device.

> I also couldn't find a way to get an error message to the user in
> case something is wrong, for example the documentation says that
> in case of error sio_write returns 0, so it is not even possible
> to detect errors?!

0 or any value different from the requested length is an error,
example:

    n = sio_write(hdl, data, len);
    delay += n;
    if (n != len)
        return -1;
    return n;

Still video hangs with this.

> Why in all the world doesn't it use -1 to indicate an error like
> write()?
>
> Then at least we wouldn't just hang but could get some message to
> the user and/or drop the data to continue playback without audio.

Suggestions are welcome.

-- Alexandre


More information about the MPlayer-dev-eng mailing list