Open jmiskovic opened 1 year ago
I'm getting roughly:
t.modules.audio = false
This was on an optimized build. If I change BUFFER_SIZE
to 1024 in audio.h I get a little bit less overhead (presumably at the cost of latency).
If I disable the window, ALSA sits at 12% CPU and the other configurations are at 10%.
These are imprecise metrics, but it does seem like ALSA has a bit more overhead than pulseaudio. Maybe not as much as you're seeing though...
t.audio.start
should be false by default, or if that's too weird/annoying.Strange that I'm the only one seeing this as it really heats up the laptop. I'm happy with using the PulseAudio backend, feel free to close the ticket.
With blank
main.lua
the lovr process consumes 12% of my CPU.Turning off the
t.modules.audio = false
brings it under the 1%.Here's the callgrind output showing how the ALSA miniaudio backend spends it's time:
Switching miniaudio backend to PulseAudio has a similar effect on CPU utilization to disabling the audio module.
I've tested the PulseAudio audio to work correctly in lovr, but this was with PipeWire which has interface for PulseAudio. I can re-test on actual PulseAudio in few days. @bjorn you mentioned some issues with PA you had before, let me know what so I can test that specifically.
Edit: above profiling is done with
valgrind --tool=callgrind ./lovr .
on the debug build, and visualized through kcachegrind.