jontio / JAERO

Demodulate and decode Aero signals. These signals contain SatCom ACARS messages as used by planes beyond VHF ACARS range
https://jontio.zapto.org/hda1/jaero.html
MIT License
224 stars 39 forks source link

Do not abuse audio backend (pulseaudio) with single sample writes #79

Closed vladisslav2011 closed 2 years ago

vladisslav2011 commented 2 years ago

It look like AudioOutDevice::readData does bad things to audio backend if the circular buffer is full. It writes 1 sample per call, increasing CPU consumption and making pulseaudio (in case, it is used) have hard times trying to synchronize all streams if there are multiple instances of JAERO running. Writing more dummy samples (2000 works well) at once reduces load on both pulseaudio and JAERO making it easier to run multiple instances and prevents pulseaudio crashes. Closes https://github.com/jontio/JAERO/issues/77 Pulseaudio CPU time consumption master: JAERO-pulse-cpu-usage This branch: JAERO-fixed-pulseaudio

jontio commented 2 years ago

Ok seems fine to me.