// Audio quality preferences for outgoing voice/music. `voice` is the default // — Opus 48 kbps stereo with full DSP (echo cancellation + noise suppression // + AGC). `hifi` bumps to 96 kbps stereo Opus and disables all DSP so music, // instruments, or broadcast-style voice streams stay uncoloured. const STORAGE_KEY = 'chatapp.audio'; export type AudioQuality = 'voice' | 'hifi'; export interface AudioSettings { quality: AudioQuality; // Preferred input deviceId from enumerateDevices. null = use browser default // (whatever the OS points at). Persisted across sessions, so "grandma's // mic is default" stays even after browser picks the wrong device. inputDeviceId: string | null; // Preferred output (speaker/headphone) deviceId. null = system default. // Applied to every