fix(sdr): bound decoder work and stabilize FM playback

Keep USB reads in a bounded ordered pipeline, acknowledge and cap decoder
work, terminate stopped workers, and buffer short playback jitter. Throttle
display telemetry and compute spectra only while seeking.

Preserve PR #1174's wrapped seeking and fresh-spectrum tagging. Add opt-in
bounded timing diagnostics and decoder/playback lifecycle regressions.

Co-authored-by: Aditya <[email protected]>
This commit is contained in:
Mazeyar Moeini FeizabadiandAditya committed 2026-10-16 18:37:15 +02:00
1 parent 537e99dfa4
commit 240f7ae3da
10 files changed
+2305 -75

No files matched your search

+2
View File
@@ -91,6 +91,7 @@ export function findDirectionalFmPeak(
minFrequency = 87_500_000,
maxFrequency = 108_000_000,
thresholdDb = 6,
skipFrequency = NaN,
} = {},
) {
if (
@@ -124,6 +125,7 @@ export function findDirectionalFmPeak(
) {
if (direction > 0 && frequency <= afterFrequency + 75_000) continue;
if (direction < 0 && frequency >= afterFrequency - 75_000) continue;
if (Math.abs(frequency - skipFrequency) <= 75_000) continue;
const index = Math.round(
(frequency - centerFrequency) / binWidth + bins.length / 2,
);