feat: persist audio capture device selection to config.yaml
Device choice now survives server restarts. Falls back to default if the saved device is no longer available.
This commit is contained in:
@@ -307,6 +307,12 @@ async def set_visualizer_device(
|
||||
# set_device() handles stop/start internally if capture was running
|
||||
success = analyzer.set_device(device_name)
|
||||
|
||||
# Persist selection to config.yaml so it survives server restarts
|
||||
if success:
|
||||
from ..config_manager import config_manager
|
||||
|
||||
config_manager.set_setting("visualizer_device", device_name)
|
||||
|
||||
return {
|
||||
"success": success,
|
||||
"current_device": analyzer.current_device,
|
||||
|
||||
Reference in New Issue
Block a user