PortMidi / portmidi

portmidi is a cross-platform MIDI input/output library
Other
116 stars 31 forks source link

Add support for sndio #55

Closed rrrapha closed 11 months ago

rrrapha commented 1 year ago

This adds support for sndio (https://sndio.org/). The code is adapted from the current OpenBSD port. See https://cvsweb.openbsd.org/ports/audio/portmidi/

Note that sndio is available on FreeBSD, Linux and NetBSD too. This is why there are no OS-specific checks in CMakeLists.txt

To enable sndio (if available), the option USE_SNDIO can be set: $ cmake -DUSE_SNDIO=ON ..

I have tested on OpenBSD only, so it's still experimental.

rbdannenberg commented 11 months ago

Hi, and sorry I didn't merge this earlier. If anyone could do a formal test, following portmidi/pm_test/README.txt step-by-step, that would be great. It's definitely a pain because there's a lot of manual setup for each test, but these tests have identified a number of problems, even with seemingly safe and minor changes. It's worth the time.

rrrapha commented 11 months ago

Hi @rbdannenberg, thanks for merging this.

Some features are not (yet) implemented for the sndio backend:

I have tried the tests from pm_test/README.txt on OpenBSD. The following tests seem to work: 1-5, 7, 15, 16, 17, 21, 23, 30. Test 10 works, but has noticeable jitter on OpenBSD. All tests with latency or virtual devices involved do not work.