fix: real VU meter levels from pipeline instead of random animation
- Added input_level and output_level to /api/state (scaled 0-100) - React RigScreen now reads real levels from state instead of random walk - When no audio flows, VU meters show flat (0) instead of fake animation
This commit is contained in:
@@ -1023,6 +1023,8 @@ class WebServer:
|
||||
"nam_model": None,
|
||||
"ir_loaded": False,
|
||||
"ir_name": None,
|
||||
"input_level": 0,
|
||||
"output_level": 0,
|
||||
"wifi": {},
|
||||
"bluetooth": {},
|
||||
}
|
||||
@@ -1065,6 +1067,9 @@ class WebServer:
|
||||
"nam_model": current_model_name,
|
||||
"ir_loaded": bool(ir and ir.is_loaded) if ir else False,
|
||||
"ir_name": current_ir_name,
|
||||
# Audio levels from pipeline (RMS float32 normalized 0.0-1.0, scaled to 0-100)
|
||||
"input_level": min(100, round((pl._input_level or 0.0) * 150)) if pl else 0,
|
||||
"output_level": min(100, round((pl._output_level or 0.0) * 150)) if pl else 0,
|
||||
"wifi": self._gather_wifi_state(),
|
||||
"bluetooth": self._gather_bt_state(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user