feat: display number of x-runs and show CPU usage#195
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds real-time JACK status indicators to the UI by tracking xruns (buffer underruns) and displaying current JACK CPU load in the peak meter/status area, addressing issue #193.
Changes:
- Extend i18n
Translationswith new labels for xruns and CPU usage (EN + ZH_CN). - Track xruns via a shared
Arc<AtomicU64>updated fromjack::NotificationHandler::xrun. - Plumb xrun count + JACK CPU load into
PeakMeterDisplayand render them with basic threshold-based coloring.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/i18n/mod.rs |
Adds translatable strings for xruns and cpu. |
src/gui/components/peak_meter.rs |
Extends the peak meter widget to store/render xrun count and CPU load with colored status text. |
src/gui/app.rs |
Updates the peak meter polling handler to pass xrun count and CPU load into the display. |
src/audio/manager.rs |
Stores shared xrun counter, exposes xrun_count()/cpu_load() getters, and wires a stateful notification handler into activate_async. |
src/audio/jack.rs |
Implements xrun() notification callback to increment the shared xrun counter. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Useful!
closes #193