Coerces a Uint8Array view or standalone ArrayBuffer into a freshly-copied ArrayBuffer sized to the
view's window. Copying (rather than aliasing) avoids handing the bridge a buffer whose bytes change
underneath it when the native addon recycles its capture buffer. Defined here (the Slack package has no
shared PCM helper to reuse) and exported for direct testing.
Coerces a
Uint8Arrayview or standaloneArrayBufferinto a freshly-copiedArrayBuffersized to the view's window. Copying (rather than aliasing) avoids handing the bridge a buffer whose bytes change underneath it when the native addon recycles its capture buffer. Defined here (the Slack package has no shared PCM helper to reuse) and exported for direct testing.