Page MenuHomeFreeBSD

Example of audio/MIDI with select(2), poll(2) and kqueue(2)
Needs ReviewPublic

Authored by meka_tilda.center on Sep 29 2022, 2:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 28, 11:20 PM
Unknown Object (File)
Mon, Apr 22, 8:18 PM
Unknown Object (File)
Jan 2 2024, 12:24 PM
Unknown Object (File)
Dec 13 2023, 3:36 AM
Unknown Object (File)
Oct 9 2023, 5:41 PM
Unknown Object (File)
Oct 9 2023, 5:41 PM
Unknown Object (File)
Oct 5 2023, 6:14 AM
Unknown Object (File)
Sep 6 2023, 9:24 AM
This revision needs review, but all specified reviewers are disabled or inactive.

Details

Reviewers
hselasky
Summary

The simplest example of combining audio and MIDI IO in a single thread

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I think it would be better to use poll() because then you can select if you listen for read or write events ??

I think that would not be the simplest example, and I was aiming at simplicity. My idea with audio, MIDI and combined example was to make it as simple as possible. Next examples are going to be harder topics: handling 24bit audio in different endianess, ability to choose between select, poll and kqueue and combining it all into one big example at the end. That being said, can we keep this example as is?

meka_tilda.center retitled this revision from Example of audio/MIDI with select(2) to Example of audio/MIDI with select(2) and poll(2).

Added kqueue/kevent example and made the choice of select/poll/kqueue selectable on runtime.

meka_tilda.center retitled this revision from Example of audio/MIDI with select(2) and poll(2) to Example of audio/MIDI with select(2), poll(2) and kqueue(2).Aug 29 2023, 2:28 PM