hinto-janai / festival

Music player
https://festival.pm
MIT License
273 stars 5 forks source link

Audio sometimes cuts out on high CPU usage #50

Closed hinto-janai closed 1 year ago

hinto-janai commented 1 year ago

OS & Version

Festival v1.1.0

Bug

When running other CPU intensive tasks, Festival's audio sometimes briefly cuts out.

Maybe this is acceptable if the CPU really was at 100%, but it happens even when not fully utilized.

Steps

  1. Play audio
  2. Run other CPU intensive task
  3. Experience audio cut out

Fix

Increase in-memory audio buffer, decrease message leeway for Audio, make decode loop more efficient.

jansol commented 1 year ago

As an optional thing, the audio thread could potentially be made realtime if rtkit is available?

hinto-janai commented 1 year ago

Right, thanks for the reminder. It was previously on a high-priority thread, but after switching to manually decoding/demuxing, I forgot to re-add it. Realtime would be nice but I'm not sure if there's good cross-platform APIs for it.