From 38b9cb2910a871d917b8cdbbdd44496265d0d5df Mon Sep 17 00:00:00 2001 From: iamdoubz <> Date: Mon, 6 Jul 2026 16:00:59 -0500 Subject: [PATCH] feat(audio): add audioDevices state + loadAudioDevices/setAudioOutputDevice --- src/lib/stores/settings.svelte.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/lib/stores/settings.svelte.ts b/src/lib/stores/settings.svelte.ts index 127bec1..13853e8 100644 --- a/src/lib/stores/settings.svelte.ts +++ b/src/lib/stores/settings.svelte.ts @@ -8,6 +8,7 @@ import { errorMessage, events, type AppSettings, + type AudioDeviceInfo, type SyncTargetInfo, type SyncTargetConfig, type HardwareStatus, @@ -33,6 +34,7 @@ const DEFAULT_SETTINGS: AppSettings = { retention_max_size_gb: null, pst_last_path: null, pst_auto_sync: false, + audio_output_device: null, // system default render device (FR-CAP-1) }; class SettingsStore { @@ -47,6 +49,7 @@ class SettingsStore { // Hardware + model management (Phase 3, T3.6/T3.7). hardware = $state(null); models = $state([]); + audioDevices = $state([]); downloadProgress = $state>({}); // Privacy self-check (T7.6, FR-SEC-2). @@ -71,6 +74,7 @@ class SettingsStore { this.backendStub = true; } await this.loadHardware(); + await this.loadAudioDevices(); await this.loadModels(); await this.loadPrivacy(); await this.loadLlmStatus(); @@ -125,6 +129,18 @@ class SettingsStore { } } + async loadAudioDevices() { + try { + this.audioDevices = await api.listAudioDevices(); + } catch { + this.audioDevices = []; + } + } + + async setAudioOutputDevice(deviceId: string | null) { + await this.patch({ audio_output_device: deviceId }); + } + async loadModels() { try { this.models = await api.listModels();