Psychotoxical 2d222e2691 fix(loudness): break feedback loop that froze Windows UI when LUFS active
When loudness normalization is on, every PARTIAL_LOUDNESS_EMIT_INTERVAL_MS
(900 ms per active stream task) the backend emits analysis:loudness-partial.
The frontend listener wrote cachedLoudnessGainByTrackId and unconditionally
called updateReplayGainForCurrentTrack, which invoked audio_update_replay_gain,
which in turn emitted audio:normalization-state back to the renderer — closing
a loop the UI had to drain on every tick. WebKitGTK absorbed it; WebView2 did
not, and after a few minutes the renderer thread stalled while Rust analysis
tasks kept progressing (visible in logs).

Five gates close the loop, smallest first:

Frontend (src/store/playerStore.ts):
- analysis:loudness-partial listener now short-circuits when the new gainDb is
  within 0.05 dB of the cached value.
- audio_update_replay_gain calls go through invokeAudioUpdateReplayGainDeduped
  (250 ms key-based dedupe), mirroring the audio_set_normalization helper from
  #320.
- refreshLoudnessForTrack now coalesces concurrent calls per (trackId, mode)
  via loudnessRefreshInflight, mirroring waveformRefreshInflight.

Backend (src-tauri/src/audio.rs):
- audio:normalization-state emits go through maybe_emit_normalization_state,
  which keeps the last-emitted payload behind a Mutex and skips when engine
  matches and current_gain_db (±0.05 dB) / target_lufs (±0.02) are unchanged.
  Applied at all three emit sites: audio_play, audio_update_replay_gain,
  audio_set_normalization.
- analysis:loudness-partial emits are gated by partial_loudness_should_emit:
  per-track-identity last-emitted-gain map; an emit is suppressed when the new
  gain is within PARTIAL_LOUDNESS_DELTA_THRESHOLD_DB (0.1 dB) of the previous
  one. Applied to both emit_partial_loudness_from_bytes (legacy path) and the
  inline ranged_download_task progress emit.

Drive-by: split estimated_output_latency_secs into two #[cfg]-gated
definitions so the sample_rate_hz parameter is no longer flagged as unused on
Windows / macOS builds. Function originally added in c6fc3ec.

Net effect: when loudness is steady (the common case), zero IPC traffic on
this path. UI stays responsive on Windows. Tested on Windows + Linux.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 20:59:32 +03:00
2026-04-25 20:37:53 +02:00

Psysonic

Psysonic Logo

The Ultimate Desktop Client for Self-Hosted Music Libraries

Fast. Beautiful. Native. Feature-packed. Built primarily for Navidrome. Also compatible with Gonic, Airsonic, LMS and other Subsonic-compatible servers with partial feature support.




No telemetry • Native performance • Massive feature set • Community driven


Psysonic Screenshot


Warning

Psysonic is under heavy active development. Bugs and rough edges are to be expected. We reserve the right to change, remove, or rework existing features at any time without prior notice.

Server Compatibility

Psysonic is optimized first and foremost for Navidrome.

Many advanced functions integrate directly with Navidrome APIs for the best possible experience. Other Subsonic-compatible servers generally work well, but some features may be limited depending on server capabilities.

Why Psysonic?

Most Subsonic clients feel like web wrappers.

Psysonic does not.

It is a true desktop experience built with Rust, Tauri v2, and React for users who care about speed, aesthetics, customization, and serious music library management.

If you host your own music, this is what the premium experience should feel like.


Core Features

Playback Engine

  • Gapless playback
  • Crossfade
  • ReplayGain support
  • Smart Loudness Normalization
  • Infinite Queue
  • Smart Radio sessions
  • High responsiveness with low memory usage

Audio Tools

  • 10-band Equalizer
  • Presets
  • AutoEQ headphone correction
  • Per-device optimization

Library Power

  • Lightning-fast search
  • Albums / Artists / Tracks / Genres
  • Ratings system
  • Multi-select bulk actions
  • Drag & drop playlist management
  • Huge library friendly

Lyrics & Discovery

  • Synced lyrics with seek support
  • Auto-scroll sidebar lyrics
  • Fullscreen lyric mode
  • Last.fm scrobbling
  • Similar artists / love tracks / stats

Personalization

  • Huge theme collection
  • Catppuccin / Nord inspired styles
  • Glassmorphism effects
  • Font customization
  • Zoom controls
  • Keybind remapping
  • Theme Scheduler (day/night auto switch)

Power User Extras

  • CLI controls
  • USB / portable sync
  • Backup & restore settings
  • In-app auto updater
  • LAN / remote auto switching

Orbit (Upcoming)

Listen Together. In Sync. Soon.

Currently in final development and testing. Orbit will introduce synchronized shared listening sessions directly inside Psysonic.

  • Host-controlled playback
  • Join via link
  • Shared listening sessions
  • Guest song suggestions
  • Real-time queue interaction

Rolling out in an upcoming release. Community feedback will help shape the final experience.


Platforms

OS Support
Windows Native Installer (certificate pending)
macOS Signed DMG
Linux AppImage / DEB / RPM / AUR (psysonic, psysonic-bin) / NixOS

Supports 8 languages and growing.


Install

Linux

curl -fsSL https://raw.githubusercontent.com/Psychotoxical/psysonic/main/scripts/install.sh | sudo bash

Windows

Download the latest installer from Releases.

SmartScreen warnings may appear until the code-signing certificate is active.

macOS

Download the signed DMG from Releases.


Development

git clone https://github.com/Psychotoxical/psysonic.git
cd psysonic
npm install
npm run tauri:dev

Build release:

npm run tauri:build

Privacy First

  • No telemetry
  • No spyware nonsense
  • No analytics harvesting
  • Your library stays yours

Community

Join Discord, report bugs, suggest features, share themes, shape the future.


License

GNU GPL v3.0


Stop using boring music clients.

Use Psysonic.

S
Description
fork a psysonic player for contrib
Readme 58 MiB
Languages
TypeScript 68.9%
Rust 25.7%
CSS 4.7%
JavaScript 0.3%
Shell 0.2%