remove(seekbar): drop realtime_waveform style

Downloaded and fully decoded the entire audio file on every track
change — too CPU/bandwidth intensive to keep. Removes SeekbarStyle
variant, Rust command, waveform_decode function, all frontend canvas
code, seekbarRealtime_waveform i18n keys across all 8 locales, and
unused urlencoding dependency from Cargo.toml.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Psychotoxical
2026-04-16 21:15:48 +02:00
parent 2f1d52e100
commit b6812de26b
2 changed files with 10 additions and 3 deletions
+1
View File
@@ -3109,6 +3109,7 @@ pub fn audio_set_gapless(enabled: bool, state: State<'_, AudioEngine>) {
// Linux: case 2 is disabled — ALSA/cpal often omit the active sink from
// enumeration while streaming, which caused false resets to system default.
pub fn start_device_watcher(engine: &AudioEngine, app: tauri::AppHandle) {
let reopen_tx = engine.stream_reopen_tx.clone();
let stream_handle = engine.stream_handle.clone();
+9 -3
View File
@@ -1,7 +1,6 @@
import React, { useEffect, useRef, useState } from 'react';
import { usePlayerStore } from '../store/playerStore';
import { useAuthStore, type SeekbarStyle } from '../store/authStore';
function fmt(s: number): string {
if (!s || isNaN(s)) return '0:00';
return `${Math.floor(s / 60)}:${Math.floor(s % 60).toString().padStart(2, '0')}`;
@@ -733,7 +732,10 @@ export function SeekbarPreview({
useEffect(() => {
const canvas = canvasRef.current;
if (!canvas) return;
const heights = style === 'waveform' ? makeHeights('seekbar-preview-demo') : null;
let heights: Float32Array | null = null;
if (style === 'waveform') {
heights = makeHeights('seekbar-preview-demo');
}
const animState = makeAnimState();
let t = 0;
const tick = () => {
@@ -818,7 +820,11 @@ export default function WaveformSeek({ trackId }: Props) {
styleRef.current = seekbarStyle;
useEffect(() => {
heightsRef.current = trackId ? makeHeights(trackId) : null;
if (!trackId) {
heightsRef.current = null;
return;
}
heightsRef.current = makeHeights(trackId);
}, [trackId]);
// Imperative subscription — no React re-renders from progress changes.