kvm/ui/src
Alex P 9d86b02e66 Integrate libspeexdsp for high-quality audio resampling
Replace ALSA plugin layer resampling with libspeexdsp for improved audio
quality and reliability. This implementation uses direct hardware access
(hw:) instead of ALSA plugins (plughw:) and handles sample rate conversion
with SpeexDSP's high-quality sinc-based resampler.

Key changes:
- Add libspeexdsp 1.2.1 with ARM NEON optimizations to build dependencies
- Switch from plughw: to hw: device access for lower latency
- Implement conditional resampling (only when hardware rate ≠ 48kHz)
- Use SPEEX_RESAMPLER_QUALITY_DESKTOP for high-quality interpolation
- Add automatic audio dependency building in dev_deploy.sh

Quality improvements:
- Fix race condition in resampler cleanup with mutex protection
- Fix memory leak on resampler re-initialization
- Add buffer overflow validation (3840 frame limit for 192kHz)
- Improve error logging for resampling, encoding, and ALSA configuration
- Simplify code structure while maintaining all functionality

Technical details:
- Hardware negotiates actual sample rate (e.g., HDMI may vary)
- SpeexDSP converts hardware rate → 48kHz for Opus encoding
- USB Audio Gadget hardcoded to 48kHz (no resampling overhead)
- Static buffer allocation for zero allocation in hot path
- WebRTC requires 48kHz RTP clock rate per RFC 7587
2025-11-21 16:29:02 +02:00
..
assets Update UI dependencies (#819) 2025-09-24 12:16:02 +02:00
components Merge branch 'dev' into feat/audio-support 2025-11-20 23:47:44 +02:00
constants Localize the client/browser UI with inlang paraglide-js (#864) 2025-10-23 14:27:29 +02:00
hooks Merge branch 'dev' into feat/audio-support 2025-11-20 23:47:44 +02:00
keyboardLayouts Localize the client/browser UI with inlang paraglide-js (#864) 2025-10-23 14:27:29 +02:00
providers Apply and Upgrade Eslint (#288) 2025-03-25 11:56:24 +01:00
routes Integrate libspeexdsp for high-quality audio resampling 2025-11-21 16:29:02 +02:00
utils refactor: OTA (#912) 2025-11-19 15:20:59 +01:00
api.ts Release 202412292127 2024-12-29 21:27:42 +01:00
cva.config.ts Release 202412292127 2024-12-29 21:27:42 +01:00
index.css feat: failsafe mode (#952) 2025-11-11 13:13:42 +01:00
keyboardLayouts.ts Localize the client/browser UI with inlang paraglide-js (#864) 2025-10-23 14:27:29 +02:00
keyboardMappings.ts Localize the client/browser UI with inlang paraglide-js (#864) 2025-10-23 14:27:29 +02:00
main.tsx Merge branch 'dev' into feat/audio-support 2025-10-30 02:14:30 +02:00
notifications.tsx Localize the client/browser UI with inlang paraglide-js (#864) 2025-10-23 14:27:29 +02:00
root.tsx Upgrade vite and react-router (#778) 2025-09-04 12:20:01 +02:00
ui.config.ts Merge branch 'dev' into feat/audio-support 2025-11-11 21:40:29 +02:00
utils.ts feat: add microphone auto-enable setting with session-based opt-in 2025-11-03 22:09:39 +02:00
webrtc.d.ts Release 202412292127 2024-12-29 21:27:42 +01:00