ME
Fixes Mac Audio
mediar-ai/screenpipe#1859

name: pull request about: submit changes to the project title: “[pr] Fix macOS audio resilience - prevent disconnections” labels: ‘’ Issue: #1626


description

Fixes macOS audio recording randomly stopping after 48-50+ hours by implementing connection resilience instead of reactive restarts.

Changes:

  • Improved error handling to continue on temporary audio errors (sleep/wake, driver hiccups)
  • Added automatic device reconnection for disconnected streams within 30 seconds
  • Added retry logic with exponential backoff for device startup failures
  • Added lightweight monitoring for connection health on macOS (30s intervals)
  • Removed heavy timer-based restart approach in favor of prevention

Root cause: macOS CoreAudio sessions get invalidated during sleep/wake cycles and the old code treated all audio errors as terminal, stopping recording completely.

related issue: (addresses reported macOS audio stability issues)

how to test

  1. Sleep/Wake Test: Run screenpipe on macOS, close laptop lid for 30+ seconds, open and verify audio recording continues
  2. Long Duration Test: Run for 24+ hours on macOS and verify audio doesn’t stop (vs. previous 48-50h failure)
  3. Device Disconnection Test: Unplug/replug audio devices and verify automatic reconnection within 30 seconds

Expected behavior: Audio recording should maintain stable connections indefinitely on macOS, matching Windows reliability.

/claim #1626

Claim

Total prize pool $400
Total paid $0
Status Pending
Submitted August 15, 2025
Last updated August 15, 2025

Contributors

AN

Anmol Sharma

@Anmol202005

100%

Sponsors

SC

screenpi.pe

@mediar-ai

$400