[Jackaudio] read jack audio data outside process callback

Kjetil Matheussen k.s.matheussen at gmail.com
Thu Feb 13 08:46:18 CET 2020

On Wed, Feb 12, 2020 at 5:49 PM Andre Osku Schmidt <andre at osku.de> wrote:
> Hello JACKies,
> i tinkered this thing https://github.com/oskude/jackplot that plots jack audio data with opengl in real-time (and am a really happy puppy :D). but as i'm a c, jack and opengl noob, i was hoping to get some help here. (at least for the jack part)
> so i set the jack data (pointer) to a global variable
> https://github.com/oskude/jackplot/blob/bcac59813b01b3bf7c2ebebd4988b22f5bfd7cb1/jackplot.c#L38
> and read that data in opengl draw function (when ever its ready to draw)
> https://github.com/oskude/jackplot/blob/bcac59813b01b3bf7c2ebebd4988b22f5bfd7cb1/jackplot.c#L27
> (ignoring the function i read it in, am i even reading the jack data correctly?)
> i'm suprised that it works, and hasn't crashed!
> but i have the feeling that this is a bad/unsafe way to do it...
> any thoughts? tips? links?

You could look at example_clients/capture_client.c in the jack2 repository.

More information about the JackAudio mailing list