From e324d9007b53d52eed988d458aa1e90da101d944 Mon Sep 17 00:00:00 2001 From: Shawn Date: Tue, 16 Jun 2026 19:15:51 -0400 Subject: [PATCH] fix: loadAudioDevices now correctly accesses devs.devices array MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also simplified device auto-selection to match by trailing device number (e.g. 'hw:USB,0' → finds option ending in ',0'). --- src/web/ui-v2-dist/index.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/web/ui-v2-dist/index.html b/src/web/ui-v2-dist/index.html index 8b71264..fb40357 100644 --- a/src/web/ui-v2-dist/index.html +++ b/src/web/ui-v2-dist/index.html @@ -464,8 +464,17 @@ async function loadAudioDevices(){ // Load current input/output from audio profile try{ const p=await API.getAudioProfile(); - if(p.input_device)inSel.value=p.input_device; - if(p.output_device)outSel.value=p.output_device; + if(p.input_device){ + // Match by trailing device number (e.g. 'hw:USB,0' → card with device=0) + const devNum=String(p.input_device).split(',')[1]; + const opts_arr=inSel.options; + for(let i=0;i