Repository navigation
feat(gui): visualizer behind the player bar - #879
Conversation
The desktop app and the browser GUI draw a spectrum or a waveform behind the player bar while this computer plays, from the system-audio capture (WASAPI loopback on Windows, PipeWire on Linux). A click on empty bar space or the Player Bar Visualizer setting changes the mode. The PipeWire capture now ends its main loop when it closes.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
# Summary The second Chinese translation PR after #877 (refs #726): the Behavior settings and the controls every settings tab shares, in Simplified Chinese (`zh-Hans`) and Traditional Chinese with Taiwan wording (`zh-Hant`). - `src/core/i18n/settings/zh_hans.rs` and `zh_hant.rs`: setting names and descriptions for the Behavior tab, the controls every tab shares (tab names, on/off, the editing and navigation hints) and the option labels, including the new Player Bar Visualizer row from #879. - Only the labels change. What gets saved to `config.yml` (option tokens such as `release_date:desc`, key names) stays the same in every language. - `docs/configuration.md` names the Chinese labels of `auto`. - `gui/src/bindings/strings.json` is regenerated, which is most of the diff. English is unchanged, and anything not translated yet still falls back to English. Keybinding and theme settings come in the next PR. # Testing macOS (aarch64), on top of `00753912`: - `cargo fmt --all --check` and `cargo clippy --locked -- -D warnings`: clean. - `cargo test --locked`: 2196 passed, 8 ignored. The gui-feature run leaves no bindings diff. # Additional notes A native-speaker review of the wording is welcome; any fix is a one-line change in the table. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Simplified and Traditional Chinese translations throughout the settings interface, including labels, descriptions, options, prompts, and validation messages. * The language-picker documentation now shows the localized “Auto (system)” label in Chinese. The saved configuration value remains `auto`. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: 2570165831 <[email protected]>
Summary
The desktop app and the browser GUI now draw a visualizer behind the player bar while this computer plays:
A click on empty space in the bar moves to the next mode. The setting is Player Bar Visualizer in the Interface section (
behavior.player_bar_visualizer:spectrum,waveformoroff).How it works:
TickEnv.vizis now anOption<VizNeed>:Barsfor the terminal's cava bars,Samplesfor the GUI, which runs its own analysis insrc/infra/audio/winamp.rs.src/gui/visualizer.rsreads the capture on a 16 ms frame clock while a page shows the bar and this process plays. The capture opens only then, and it closes 10 s after the sound stops or the page hides the bar. A capture that brings no audio is closed and opened again after 3, 6, 12 and 24 s, then it rests until the next start. The GUI shows no status message for this.ServerMessage::Visualizeron their own latest-wins channel, and only to a socket that sentClientMessage::Visualizer { on: true }. A slow page skips frames and never fills the push backlog. The page asks only while it is visible and the full-screen view does not cover the bar.visualizerModel.tsholds the motion, the colours and the shapes as pure functions, andPlayerBarVisualizer.tsxpaints them on a canvas.Platforms: Windows and Linux. The desktop build, the
guiCI leg anddesktop.ymlnow haveaudio-viz,audio-viz-cpal, and the deb and rpm packages depend on the PipeWire library. macOS stays off at runtime, because the capture there opens the microphone. The terminal Settings show the row only on Linux and Windows, where the desktop app can use it.Two capture fixes come with it:
PipeWireCapturenever ended its main loop when it closed, so each close left a thread and a connected PipeWire stream behind. It now quits the loop.Testing
On Windows 11, at this commit:
uri_round_tripparses a Unix path, so it fails only on Windows. My change does not touchsrc/infra/local.focus.shot.ts"a sidebar click keeps focus ..." in WebKit. It fails the same way on a cleanmainon Windows.Additional notes
visualizer spectrumandvisualizer waveform, are in thegui-shotsartifact. Thesettingsscene now shows the new row.gui/src/bindingsis regenerated:VisualizerFrameis new, andClientMessage,ServerMessage,GuiStrings,SettingsStringsandstrings.jsonchanged.desktop/Cargo.lockgains the capture crates (pipewire,realfftand their dependencies). No version of an existing crate moved.💬 Questions or want to chat with other contributors? Join the spotatui Discord.
Summary by CodeRabbit