Skip to content

v0.5: Force the FPS setting (fixes #10).

Compare
Choose a tag to compare
@Kharacternyk Kharacternyk released this 28 Aug 18:30
· 58 commits to master since this release
Before this commit PulseAudio was the one who decides the size of the
fragments in which samples are delivered to barva. Thus, BARVA_FPS
wasn't more than an illusion: we requested small chunks to process them
ASAP to keep up with BARVA_FPS, but PulseAudio handed us the chunks in
large "groups", not ASAP. We indeed updated the background BARVA_FPS
times per second, but we didn't do it uniformly; instead, it was like
this: wait some substantial amount of time for the next group, quickly
process all the chunks in the group, repeat.

This commit forces PulseAudio to hand us the chunks one by one ASAP, not
in large groups. It fixes the visual lagging described in #10. However,
this change revealed that PulseAudio can't even keep up with the default
BARVA_FPS=60, causing the audio playback to lag (at least on my machine).
Thus, we also lower the default to 30. For comparison, CAVA updates 22
times per second, so we're in a good company.