Audio capture: stop blocking main thread, send raw PCM buffers #8
Labels
No labels
ai
ai:in-progress
ai:in-review
ai:merging
ai:needs-attention
cleanup
performance
security
severity/high
severity/low
severity/medium
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
adam/sunburn-desktop#8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem:
execSync('pw-dump')up to 25× plusexecSync('pw-link …')per port on the main process → UI freezes during share start.Array.from(pcmData)before IPC — huge per-chunk allocation/serialisation.onAudioPcmDatain preload adds anipcRenderer.onlistener per call and returns no unsubscribe, so listeners pile up across shares (pwa side tracked separately).Fix:
execFile(promisified) forpw-dump/pw-link.Buffer/Uint8Arraydirectly.onAudioPcmDatareturns an unsubscribe function; pwa calls it on teardown.Where:
src/audio.js:32,180-250,262-266,preload.js:12-14Fixed by #10 (#10)