mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 06:25:41 +00:00
feat(playback): loudness bind rules, analysis seeding, and normalization UI
Resolve integrated loudness from SQLite only at decode bind; keep pre-trim until a row exists, then allow provisional gain from live updates. Pass DB-stable hints from the web app into play and gapless preload. Default pre-measurement attenuation -4.5 dB with an icon reset in Settings; drop redundant normalization copy and shorten pre-trim descriptions. analysis_cache seed_from_bytes returns an outcome and skips redundant waveform work on cache hits; wire callers and related frontend/backend glue.
This commit is contained in:
@@ -30,6 +30,22 @@ try {
|
||||
// Ignore in non-Tauri runtimes.
|
||||
}
|
||||
|
||||
// Zustand rehydrate runs after first paint; AppShell's useEffect can miss the
|
||||
// user's persisted `loggingMode` until then — but waveform/audio may already
|
||||
// run. Push persisted mode to Rust before React mounts (matches `psysonic-auth`).
|
||||
try {
|
||||
const raw = localStorage.getItem('psysonic-auth');
|
||||
if (raw) {
|
||||
const parsed = JSON.parse(raw) as { state?: { loggingMode?: string } };
|
||||
const mode = parsed.state?.loggingMode;
|
||||
if (mode === 'off' || mode === 'normal' || mode === 'debug') {
|
||||
void invoke('set_logging_mode', { mode });
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
// Ignore parse / non-Tauri.
|
||||
}
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root')!).render(
|
||||
<StrictMode>
|
||||
<App />
|
||||
|
||||
Reference in New Issue
Block a user