Jack-Audio process callback time period/Rate

Programming applications for making music on Linux.

Moderators: MattKingUSA, khz

Post Reply
nahumb
Established Member
Posts: 9
Joined: Mon Jul 30, 2018 8:51 am

Jack-Audio process callback time period/Rate

Post by nahumb »

Hi,

I'm using Jack API in a synthesizer c++ program I'm developing running on a Raspberry Pi 4.

Sample rate is 44100 ( jackSampleRate = jack_get_sample_rate(client_out); )

Buffer size is set to 512 ( jack_set_buffer_size(client_out, _JACK_AUD_PERIOD_SIZE); ) (#define _JACK_AUD_PERIOD_SIZE 512).

Calculated process callback rate is 512/44100 = 11.6mSec.
However, actual process callback is initiated every 5.8mSec (with nframes = 512).

Any idea why the process callback rate is x2 than I expect it to be? (or my assumption is wrong? Why?)

Thanks,

Nahum
folderol
Established Member
Posts: 2069
Joined: Mon Sep 28, 2015 8:06 pm
Location: Here, of course!
Has thanked: 224 times
Been thanked: 400 times
Contact:

Re: Jack-Audio process callback time period/Rate

Post by folderol »

I don't think you can have less than two periods per buffer. Presumably one or other is being quietly adjusted.
The Yoshimi guy {apparently now an 'elderly'}
Post Reply