Skip to content

Draw the player view at 20 frames a second, not 60 - #27

Merged
chriopter merged 2 commits into
mainfrom
player-view-frames
Oct 16, 2026
Merged

chriopter merged 2 commits into
mainfrom
player-view-frames

Conversation

@chriopter

Copy link
Copy Markdown
Owner

Fixes #26. The player view, playing, drew every frame the screen offered, from three causes found by @sean-imus:

  1. Equalizer easing: Sean's commit, cherry-picked. The bars step with ui.clock instead of easing.
  2. The Waves layer: removed. It drew a second frame after every tick. Large or dense screens keep a smaller render through FullStage's shrink layer on the slot, which already covers what this layer was for.
  3. Two clocks: while vizClock runs, ui.clock now advances on its ticks rather than on its own Timer. The equalizers and the progress bar move in the frames the backdrop draws. Without the visualizer (effects off, etc.) the old timer still runs.

Not measured locally (no Rust toolchain on this machine to build the GUI). QML lint is clean and gui/tests pass. Worth a dev/bench run to confirm about 20 fps.

🤖 Generated with Claude Code

sean-imus and others added 2 commits October 17, 2026 00:32
The bars took a new height eight times a second and eased into it over
180 ms, so they never stood still and the window drew every frame the
screen offered while music played. They now jump with the window's
clock, as the comment and the terminal player have it.

The player view, playing, on a 1920x1080 60 Hz display (Intel Iris Xe,
Hyprland), measured with BRUMM_GUI_FRAMES against dev/fakedaemon:
before 60 fps and 7.5 % of a core, after 49 fps and 5.1 %.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The backdrop (Waves) drew into a half-size layer, which drew a second
frame after every tick; it is drawn at full size now. On large screens
the stage still draws it smaller (FullStage's shrink), so nothing is
lost there.

The window's clock (ui.clock) and the visualizer's (vizClock) both
ticked 20 times a second, but not together. While the visualizer's
runs, the window's clock now ticks with it, so the equalizers and the
progress bar move in the frames the backdrop draws.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@chriopter
chriopter enabled auto-merge (squash) October 16, 2026 22:33
@chriopter
chriopter merged commit 299a4dc into main Oct 16, 2026
2 checks passed
@chriopter
chriopter deleted the player-view-frames branch October 16, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The player view draws about three times the frames it is meant to

2 participants