There is a good support for sndio in the FreeBSD ports tree as well. Albeit hidden behind the SNDIO build time option. It was quite the ride to get it to that point :-)
There are also now some sndio backends out there for applications not in the OpenBSD ports tree like Cava, shairport-sync, and Kodi.
which is a common way of doing it (for any command with any inputs and outputs, not just the above ones), i.e.:
command < input_source > output_dest
All three pv command invocation variants, the one here and the two above, work. And it becomes more clear why they are the same, when you know that the redirections are done by the shell + kernel, and the command (such as pv) does not even know about it. So in all three cases, it does not see the redirections, because they are already done by the time the command starts running (with its stdin and stdout redirected to / from those respective sources). And that is precisely why the command works the same whether it is reading from the keyboard or a file or pipe, and whether it is writing to the screen or a file or pipe.
I thank you for this example. If the operator definitions are not trivial and you want to keep them well mantained, then your example is very good.
However, what I meant was that for fast, quick coding, if your 'operator' function is really simple, then lambda fints perfectlu.
I know the Zen of Python says: "There should be one—and preferably only one—obvious way to do it", but i don't align to that principle. I think there should be more than one way to do something, and one should choose one that fits the best.
I realize I'm replying to a 2 weeks old comment, so nobody will read this ever, but from your list sndio supports: streaming audio over a network, user-land mixing of audio sources, mixing of multiple audio streams at the same time,
and per application volume settings.
> Per application input/output source settings
No, but the input/output device is selectable per application via the AUDIODEVICE environment variable.
> bluetooth audio devices
OpenBSD has no bluetooth support, so no. I'm also wondering why the kernel wouldn't create audio devices from these that the userland daemon can then just transparently use? Does an audio daemon need special support for bluetooth audio devices?
There are also now some sndio backends out there for applications not in the OpenBSD ports tree like Cava, shairport-sync, and Kodi.