fix: NAM amp level param now controls input drive, JACK period 256, toggle API matching

This commit is contained in:
2026-06-14 00:01:46 +00:00
parent 9fade4a2d2
commit 9e3ab9d53b
7 changed files with 74 additions and 27 deletions
+6 -8
View File
@@ -1748,16 +1748,14 @@ class WebServer:
"channel_mode": self._channel_mgr.mode,
# Audio levels from pipeline (RMS float32 normalized 0.0-1.0, scaled to 0-100)
"input_level": (
min(100, round((getattr(pl, '_input_level', 0.0) or 0.0) * 150))
if pl and isinstance(getattr(pl, '_input_level', None), (int, float))
and not math.isnan(getattr(pl, '_input_level', 0.0))
else 0
0
if pl is None or getattr(pl, '_input_level', None) is None
else max(0, min(100, round(0 if (v := float(getattr(pl, '_input_level', 0.0))) != v else v * 150)))
),
"output_level": (
min(100, round((getattr(pl, '_output_level', 0.0) or 0.0) * 150))
if pl and isinstance(getattr(pl, '_output_level', None), (int, float))
and not math.isnan(getattr(pl, '_output_level', 0.0))
else 0
0
if pl is None or getattr(pl, '_output_level', None) is None
else max(0, min(100, round(0 if (v := float(getattr(pl, '_output_level', 0.0))) != v else v * 150)))
),
# System stats
"cpu_percent": self._gather_system_stats().get("cpu_percent", 0),