Commit graph

5 commits

Author SHA1 Message Date
scorpion-26
e1cf8f2475 PulseAudio: Optimizations
Instead of always polling audio volume, gBar subscribes to events,
causing the update to only happen on demand.
Plus we can block poll updates when there is audio change through gBar,
which results in a much smoother slider.

This change reduces (at least on my end) CPU times from 4-6% per core
to 2-4% per core.
2023-02-24 14:34:11 +01:00
scorpion-26
3c8c93d774 Add Microphone support
This commit adds a new widget for the bar: A Microphone widget. It is
disabled by default and can can
be enabled with AudioInput: true.
Implements a flyin as well.

https://github.com/scorpion-26/gBar/issues/5 for the ping
2023-02-22 17:13:14 +01:00
scorpion-26
f5adfebfe9 PulseAudio: Improve iterator loop
We now store sthe pa_operation and check if they were done'd, cancelled or still running.
2023-02-21 22:47:30 +01:00
scorpion-26
0e4b877654 PulseAudio: Make FlushLoop more robust
When PA_CONTEXT_READY is called multiple times, PulseAudio::FlusLoop() would get stuck to to integer underflow.
Now there are multiple things preventing that.

Possible fix for https://github.com/scorpion-26/gBar/issues/7
2023-02-21 21:19:22 +01:00
scorpion-26
b0ed0d17e5 Initial commit! 2023-01-13 16:19:21 +01:00