NetBSD audio – an application perspective

... or, "doing it natively, because we can"

pkgsrcCon 2019 — Nia Alarie


who am I?


audio options for NetBSD in pkgsrc

Many many abstraction layers available:


advantages of using NetBSD audio directly

[nia note: SDL2 seems very sensitive to the blk_ms sysctl being high or low, with other implementations there seems to be a less noticable difference. I don't know why.]


first test case: RetroArch



differences from the OSS implementation?

[nia note: Both Sun and OSS involve opening a device in /dev and performing standard read(2) and write(2) operations on it. The difference is how you tell the kernel to interpret the data.]


second test case: aiomixer

pkgsrc-wip - wip/aiomixer

github repository- https://github.com/niacat/aiomixer


third test case: SDL2

Popular in applications, but high latency on many platforms.

SDL already targeted NetBSD directly, but with many problems:

etlegacy patched to use OpenAL.


reimplementation

I reimplemented it using current docs and advice on SDL's bugzilla.


fourth test case: cubeb (Firefox/SeaMonkey)

cubeb is a portable audio library written in C and C++

Poor native audio support - only an unofficial OSS backend


writing a cubeb backend for NetBSD audio

[nia note: It's now one of the best supported APIs you could use. SDL2 is now very good too, but it's not as good for recording and doesn't have multi-device support.]


questions?

I might be able to answer them


thanks for listening

I'm looking for a job btw


some annotations in response to questions and other comments made during the talk, marked "nia note"