Abstract
Recording a real-time engine's output without dropouts or clipping: capture on a dedicated audio-thread node (an AudioWorklet) so main-thread stalls can't starve it; tap after the final limiter so the file can never clip; route the capture node to an always-silent (zero-gain) sink so the graph pulls samples through the tap inaudibly; and flush the node's tail buffer on stop before encoding, with graceful fallback to a ScriptProcessor using the same encoder.
Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 License.
Recommended Citation
Bailey, Bret, "Glitch-Resistant Real-Time Audio Capture on the Audio Thread, with Post-Limiter Tap, Silent-Sink Routing, and Graceful Fallback", Technical Disclosure Commons, ()
https://www.tdcommons.org/dpubs_series/10900