Re:OpenBSD: Why and How (2016)
by jim-jim-jim on Wednesday November 13, 2019 @03:45PM
(#21529347)
I love sndio. I was able to write a little synthesizer for it using nothing more than the man pages. It's weird to think that I'm using OpenBSD rather than macOS for music-making, but the latter is just too complex and unpleasant to work with.
Do you have the source somewhere public by chance? Sounds like a fun learning project.
A very endearing trait of OpenBSD developers is that when they make a system facility, it has a great C API.
Can you beat "uint32_t arc4random(void); void arc4random_buf(void *buf, size_t nbytes); uint32_t arc4random_uniform(uint32_t upper_bound);" as a RNG API? (No. Add it, glibc.)
Or you can buy a nice little library from OpenBSD where the PCM part is sufficiently described in one short man page: http://man.openbsd.org/sio_open.3
(With enough detail so that you can use it to write e.g. a latency-aware rhythm game that manages to keep audio and video in sync...)