Audio recording with alsa - how to minimize jitter

54 views Asked by At

I'm working on Linux (Debian 11) audio recording application, in which precise timestamping of audio chunks is critically important.

Audio recording is done with ALSA. I use ALSA API snd_pcm_htimestamp() to obtain last position update hi-res timestamp (see https://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m.html#ga3946abd34178b3de60fd5329b71c189b ). I read audio chunks of fixed duration and expect that difference between consequent timestamps will be close to audio chunk duration. But I see variations from chunk duration +- 0.0003 secs. This is not good enough for me.

Application runs on real-time priority.

Can be done something to reduce mentioned jitter ? Or this is inherent ALSA/kernel/Linux limitation ? Your help will be very appreciated.

Thanks

0

There are 0 answers