fix: audio params timeout - increase API timeout for JACK restart
The setAudioParams call restarts JACK which takes up to 10 seconds. The default API timeout was 6s, causing the request to abort and leaving JACK in a broken state. - Changed setAudioParams to use API._fetch directly with timeout:15000 - Also calls loadAudioParams() after success to refresh dropdown values
This commit is contained in:
@@ -804,8 +804,9 @@ async function setAudioParams(){
|
||||
const btn=document.querySelector('.sn-btn[data-section="audio"]');
|
||||
if(btn)btn.textContent='⏳ Applying...';
|
||||
try{
|
||||
await API.setAudioProfile({period,rate});
|
||||
await API._fetch('/api/audio/profile',{method:'POST',body:JSON.stringify({period,rate}),timeout:15000});
|
||||
toast('Audio: '+rate+'Hz / '+period+'fr');
|
||||
loadAudioParams();
|
||||
}catch(e){toast('Failed: '+e.message);}
|
||||
if(btn)btn.textContent='🎛 Audio';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user