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:
This branch:
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: This branch: