π¬ A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots π
TypeScript browser-extensionchrome-extensiondocumentationfirefox-extensionguide-generatorlocal-firstmanifest-v3privacy-firstproductivityreactscreenshotstep-by-step-guidetutorialtypescriptworkflowwxt
export function handedOffPcm(value: unknown): Int16Array | null {
if (value instanceof Int16Array) return value.length > 0 ? value : null;
if (value instanceof ArrayBuffer) return value.byteLength > 0 ? new Int16Array(value) : null;
if (ArrayBuffer.isView(value)) {
return value.byteLength > 0 ? new Int16Array(value.buffer, value.byteOffset, value.byteLength / 2) : null;
}
return null;
}