pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Adding native audio support to ports



Heya,

On Thu, Jan 25, 2024 at 05:50:57AM +0000, adr wrote:
> Is the audio api supposed to maintain compatibility with solaris
> and illumos in the future or it would be better to start using
> something like "netbsdaudio" instead of "sun"?

Our API is a superset of the original API ("SADA") in SunOS that is now
deprecated in favour of "Boomer" (OSS) in all maintained versions of
Solaris. It won't change there. Both Boomer and SADA are implemented
in the Solaris kernel as as abstractions around the underlying in-kernel
mixer, whereas in NetBSD things are much more "direct".

We also share it with OpenBSD, who inherited it when they forked.

Here is the documentation to read:

https://illumos.org/man/4I/audio
https://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/sys/audioio.h

The way I have done this in the past has been to write code
simply for NetBSD, then, I check what things I am using are
NetBSD only.

Usually it is very easy to adapt the code to work on both with
#ifdefs, since the NetBSD-specific stuff is mostly optimizations
(AUDIO_GETBUFINFO vs. AUDIO_GETINFO) or clarifications of the
original API (AUDIO_ENCODING_SLINEAR_LE vs. AUDIO_ENCODING_LINEAR).


Home | Main Index | Thread Index | Old Index