OSS Audio

blubee blubeeme gurenchan at gmail.com
Fri Dec 15 07:49:28 UTC 2017


On Fri, Dec 15, 2017 at 9:26 AM, Sid <sid at bsdmail.com> wrote:

> > blubee blubeeme - Tue Dec 5 00:48:05 UTC 2017
>
> > If I can provide OSS audio/midi input and output for the tools that I
> use,
> > then I can do all the routing natively with OSS.
>
> A problem with this is FreeBSD's backend sound architecture allows one
> device input or output at a time.
> cat /dev/sndstat shows this, which I believe is OSS. There is sndio's
> backend sndiod (from OpenBSD) that can alternatively be enabled, but I hear
> the volume on it is too low, and I'm not sure if it allows multiple
> devices. sndiod's backend can be enabled by service sndiod start: it is in
> /usr/local/etc/rc.d/.
>
There's nothing in FreeBSD that makes the sound architecture only support 1
audio device.
These were issues with earlier versions of OSS implementation; please
remember the days of rebooting your system to get new devices to show up.

All those issues have been sorted out in OSS 4.0 and above.

OSS API is like working with file descriptors;
The open() system call
The close() system call
The read() system call
The write() system call
The ioctl() system call
The select() and poll() system calls
The mmap() system call

What's complicated about that?

Jack audio is NOT necessary, I already ported amsynth over to FreeBSD, they
had a very old implementation of OSS backend for midi that just worked with
my midi keyboard.
I spoke to the developer and he also updated his code to the newest version
of OSS, here's some code:
https://github.com/amsynth/amsynth/commit/7171bd4d945c5938442b80f4276b7e096f06a3a0#diff-0b31b8315cadf5e7556f54a245817f90

There's a lot of misinfo out there about OSS being depreciated or dead,
that's not the case.
>From looking at what's available OSS is one of the most straight forward
and stable Audio API's out there.

If you want to test for yourself, install audio/oss then run osstest and
report back.

There's ALSA plugins for OSS that would provide better audio vs the way
things are implemented right now.


More information about the freebsd-ports mailing list