audio_jack.h
Linux audio output through JACK, dlopened.
#include <sonore/audio_jack.h>- 1type
- Guides: Platforms and formats
On this page
Design notes
Why ALSA is not enough
The ALSA backend writes to "default", which on a desktop distribution reaches PulseAudio or PipeWire and comes out of the speakers. That is right for somebody trying a plugin out.
It is not what a Linux studio runs. Serious Linux audio is JACK: it is how applications are connected to each other, how latency is kept in the low milliseconds, and how a standalone becomes something you can route into a DAW rather than a thing that only talks to the sound card. PipeWire ships a libjack that speaks the same API, so this reaches both.
The shape is genuinely different from ALSA
ALSA is a stream you WRITE to from a thread you own, in a loop. JACK is a graph that CALLS you: the server runs a real-time thread, hands every client a buffer at the same instant, and expects an answer before the deadline. So there is no render loop here and no thread of ours -- run() only activates the client and connects its ports, and the audio arrives on a thread JACK created.
That has one consequence worth stating: the process callback is as real-time-critical as a plugin's own, more so, because being late does not glitch one application -- it xruns the whole graph, every client in it.
dlopened, like everything else
Same policy as ALSA and the GTK webview. libjack is not installed on a machine that has never run it, and a standalone that failed to LOAD there would be worse than one that says "JACK is not on this machine" and falls back.
Types 1
No comment on this one in the header yet; the source says the rest.