fix: music app improvements, desktop performance improvements

This commit is contained in:
2026-03-25 19:13:26 +01:00
parent ea087769f5
commit 1ad9117fc1
12 changed files with 664 additions and 172 deletions
+23
View File
@@ -0,0 +1,23 @@
#pragma once
#include <cstdint>
#include <gui/gui.hpp>
namespace music_visualizer {
static constexpr int BAR_COUNT = 24;
struct State {
uint8_t levels[BAR_COUNT];
uint8_t peaks[BAR_COUNT];
uint8_t peak_hold[BAR_COUNT];
};
void reset(State& state);
void tick(State& state);
void feed_pcm(State& state, const int16_t* pcm, int frames, int channels);
void render(uint32_t* pixels, int bw, int bh, const gui::Rect& rect,
const State& state, gui::Color accent, gui::Color accent_dark,
gui::Color track_bg, gui::Color border);
} // namespace music_visualizer