Implement adaptive frame dropping #10

Merged
pstruebi merged 12 commits from fix/frame_drops into main 2025-11-04 16:16:34 +00:00
Owner
  • Implement adaptive frame dropping to prevent latency from accumulating
  • small packets are dropped and a crossfade is used to hide the dropping.
  • still audible in some situations
- Implement adaptive frame dropping to prevent latency from accumulating - small packets are dropped and a crossfade is used to hide the dropping. - still audible in some situations
pstruebi added 7 commits 2025-10-30 10:37:57 +00:00
pstruebi added 1 commit 2025-10-31 09:50:35 +00:00
pstruebi added 1 commit 2025-10-31 10:05:43 +00:00
- 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
pstruebi added 1 commit 2025-11-03 15:00:12 +00:00
- 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
pstruebi added 1 commit 2025-11-03 15:12:13 +00:00
- 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
pstruebi added 1 commit 2025-11-04 10:53:35 +00:00
- Added path resolution logic to handle relative file: paths robustly regardless of current working directory
- Searches for files relative to both server directory and package root
- Returns clear error message when demo audio files cannot be found
pstruebi added 1 commit 2025-11-04 12:32:47 +00:00
- Log audio input details (type, source, sample rate, channels) when opening
- Log first PCM frame metadata (size, samples, bytes per frame) for debugging
- Log first LC3 encoded frame size to verify encoding pipeline
pstruebi added 1 commit 2025-11-04 12:56:40 +00:00
pstruebi added 1 commit 2025-11-04 13:01:58 +00:00
- Wrapped main stream processing logic in try-except block to catch and log exceptions per BIG
- Added debug logging for frames generator creation and PCM frame retrieval
- Reduced code indentation and removed unnecessary comments for better readability
pstruebi added 1 commit 2025-11-04 13:07:05 +00:00
- Read one frame from each non-precoded input to validate audio sources are working
- Store primed frames for drift compensation crossfading when enabled
- Add logging to track successful prime reads and diagnose potential input issues
pstruebi force-pushed fix/frame_drops from 2d53e6130b to a196bcd2fc 2025-11-04 14:12:14 +00:00 Compare
pstruebi merged commit 98dd00e653 into main 2025-11-04 16:16:34 +00:00
pstruebi deleted branch fix/frame_drops 2025-11-04 16:16:34 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: auracaster/bumble-auracast#10