Implement adaptive frame dropping #10

Merged
pstruebi merged 12 commits from fix/frame_drops into main 2025-11-04 16:16:34 +00:00

12 Commits

Author SHA1 Message Date
pstruebi a196bcd2fc fix: disable periodic stats for WAV inputs and guard sample_rate access 2025-11-04 15:11:47 +01:00
pstruebi c01bdb8b96 feat: add detailed audio device logging for input stream setup
- Added comprehensive logging of audio device configuration when opening input stream
- Included host API name, device details, channel count, and latency parameters in logs
- Added PortAudio version logging to help with troubleshooting
- Implemented error handling for device query failures with warning log output
2025-11-03 16:12:09 +01:00
pstruebi 230db3a96b feat: persist and restore demo stream configuration
- Added persistence of demo stream type and count to maintain user preferences across sessions
- Enhanced demo stream selection to automatically restore previously selected configuration
- Added fallback logic to match saved sampling rate and stream count when exact demo type not found
- Updated secondary stream initialization to track total demo streams across primary/secondary configs
- Modified settings storage to include demo_stream_type and demo
2025-11-03 16:00:09 +01:00
pstruebi f91f177b9a feat: enforce 48kHz audio capture and fix device detection
- Changed audio capture rate to fixed 48kHz instead of using device default to prevent resampling latency and 44.1kHz compatibility issues
- Updated device detection to use get_alsa_usb_inputs() instead of get_usb_pw_inputs() for more accurate USB audio device discovery
- Maintains original channel count logic to use maximum of 2 channels based on device capabilities
2025-10-31 11:05:38 +01:00
pstruebi 3b1479dfb8 Merge branch 'main' into fix/frame_drops 2025-10-31 10:50:29 +01:00
pstruebi 7cd8e66f44 feat: add PipeWire network input support and improve device selection logic 2025-10-24 09:36:48 +02:00
pstruebi 6db0405d80 feat: enable adaptive frame dropping only for device-based audio inputs 2025-10-23 18:43:44 +02:00
pstruebi 9bdf8e6348 refactor: rename drift_compensation to adaptive_frame_dropping for clarity 2025-10-23 18:43:38 +02:00
pstruebi da957141b4 refactor: simplify clock drift compensation with hardcoded parameters and improved frame drop logic 2025-10-23 18:32:59 +02:00
pstruebi 60aa653aeb tune the adaptive resampler to be near to inaudible 2025-10-23 18:23:20 +02:00
pstruebi 329510beae feat: add ALSA backend support and advanced audio metrics logging 2025-10-22 08:32:10 +02:00
pstruebi 6d835bf1be feat: add clock drift compensation to discard excess samples when buffer exceeds threshold 2025-10-08 14:27:58 +02:00