Mpv: Please return OSS audio output

Created on 22 Nov 2020  路  13Comments  路  Source: mpv-player/mpv

Important Information

  • mpv version: 0.33.0
  • Platform and Version: FreeBSD
  • Source of the mpv binary: self build

Reproduction steps

mpv some-file.mkv

Expected behavior

Expected audio output.

Actual behavior

No audio output.

Most helpful comment

Quoting the commit that removed it (bca917f):

Ancient Linux audio output. Apparently it survived until now, because
some BSDs (but not all) had use of this. But these should work with
ao_sdl or ao_openal too (that's why these AOs exist after all). ao_oss
itself has the problem that it's virtually unmaintainable from my point
of view due to all the subtle (or non-subtle) difference. Look at the
ifdef mess and the multiple code paths (that shouldn't exist) in the
removed source code.

OSS is an API, native API for sound in FreeBSD. In Linux, it's interface to ancient(pre-ALSA) sound system - true. However, FreeBSD has in kernel sound system implementation is modern and, I believe, most powerful, along all open source OS's kernels. It supports multichannel audio, per-application volume control, dynamic mixing through virtual sound channels, true full duplex operation, bit perfect audio, rate conversion and low latency modes. Without any third-party software.

Do the alternatives mentioned not work for you? If not, why not?

I have only OSS and sndio outputs in my system. But, sndio was also removed.

All 13 comments

Quoting the commit that removed it (bca917f):

Ancient Linux audio output. Apparently it survived until now, because
some BSDs (but not all) had use of this. But these should work with
ao_sdl or ao_openal too (that's why these AOs exist after all). ao_oss
itself has the problem that it's virtually unmaintainable from my point
of view due to all the subtle (or non-subtle) difference. Look at the
ifdef mess and the multiple code paths (that shouldn't exist) in the
removed source code.

Do the alternatives mentioned not work for you? If not, why not?

Quoting the commit that removed it (bca917f):

Ancient Linux audio output. Apparently it survived until now, because
some BSDs (but not all) had use of this. But these should work with
ao_sdl or ao_openal too (that's why these AOs exist after all). ao_oss
itself has the problem that it's virtually unmaintainable from my point
of view due to all the subtle (or non-subtle) difference. Look at the
ifdef mess and the multiple code paths (that shouldn't exist) in the
removed source code.

OSS is an API, native API for sound in FreeBSD. In Linux, it's interface to ancient(pre-ALSA) sound system - true. However, FreeBSD has in kernel sound system implementation is modern and, I believe, most powerful, along all open source OS's kernels. It supports multichannel audio, per-application volume control, dynamic mixing through virtual sound channels, true full duplex operation, bit perfect audio, rate conversion and low latency modes. Without any third-party software.

Do the alternatives mentioned not work for you? If not, why not?

I have only OSS and sndio outputs in my system. But, sndio was also removed.

Then please install OpenAL (or SDL), recompile and see if ao_openal works for you.
Because if it does, that'll be the audio output you're supposed to use on FreeBSD.

OSS support is unlikely to return unless someone steps up to maintain it and the code can somehow be made less messy (perhaps by dropping support for anything but the "modern" variant of OSS APIs).

Then please install OpenAL (or SDL), recompile and see if ao_openal works for you.
Because if it does, that'll be the audio output you're supposed to use on FreeBSD.

OSS support is unlikely to return unless someone steps up to maintain it and the code can somehow be made less messy (perhaps by dropping support for anything but the "modern" variant of OSS APIs).

I use this output every day, it works perfect. Looked into the code of OSS output. I don't see the "messy", there are 657 lines of code in only one single file. OSS API not changed(only implementation) over time, so there is no "modern" variant. I will be happy to clean up the code if anyone can explain to me, what is wrong with existing code.

Thank you.

The existing code was not compatible with the way the internal audio refactoring was done.

This is an ideal opportunity for a BSD user to step forward and contribute.

The existing code was not compatible with the way the internal audio refactoring was done.

This is an ideal opportunity for a BSD user to step forward and contribute.

This is the answer and starting point.

Thank you.

The issue now can be closed.

And for the record, in the mean time OpenAL or SDL do provide OSS back-ends if I recall correctly and as @sfan5 mentioned, so there can be audio played with 0.33.0 on FreeBSD in the mean time.

:-(

Please specify what should be done to return OSS.
What changes required?

OSS support is unlikely to return unless someone steps up to maintain it and the code can somehow be made less messy (perhaps by dropping support for anything but the "modern" variant of OSS APIs).

There is a little #ifdef code to provide various OSS implementations and versions.
It is not a problem, there is no other way to do this more pretty.
Even if I want to drop some #ifdef blocks - I have only FreeBSD to test. After drop #ifdef blocks non FreeBSD may have regression.

I'm by no means an expert on this part of the code, but I believe a good first step is to only support oss v4 and drop support for everything else.

Oh, shit! Thank from another FreeBSD user. Linux folks think their OS is the only one :angry:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lightonflux picture lightonflux  路  4Comments

thebunnyrules picture thebunnyrules  路  3Comments

WoLpH picture WoLpH  路  3Comments

laichiaheng picture laichiaheng  路  3Comments

jcowgill picture jcowgill  路  3Comments