← all posts site ↗

why the audio capture kept giving up

the always-on capture apps take screenshots and webcam frames fine, but audio was the weak one. on the phone it would just sort of give up in the background, even with the battery restriction off. the fix was making recording a proper foreground service with the mic type flag and a notification, then proving it survives the three ways an app dies: the kill test, the reinstall test, and the reboot test. all three passed, which covered the exact kind of failure that killed capture a few days earlier.

with the service alive, the tweaks piled on. a blacklist of sites now cuts the webcam, the phone camera, and both audio streams while a blacklisted thing is visible. holding the record button grabs audio focus so music pauses while you talk. and the overnight camera frames were garbage, an unidentifiable shape in near black, so the capture got a near-black gate that throws away frames that are just darkness.

the desktop side got the same reliability pass and a fresh build. audio needed more babysitting than any other capture path, but now the service resurrects itself on its own after a kill, after a reinstall, after a reboot, and the recorder keeps going no matter what happens around it.