MCPcopy Create free account
hub / github.com/PABannier/bark.cpp / convertTypedArray

Function convertTypedArray

examples/wasm/helpers.js:3–7  ·  view source on GitHub ↗
(src, type)

Source from the content-addressed store, hash-verified

1// Common Javascript functions used by the examples
2
3function convertTypedArray(src, type) {
4 var buffer = new ArrayBuffer(src.byteLength);
5 var baseView = new src.constructor(buffer).set(src);
6 return new type(buffer);
7}
8
9var printTextarea = (function () {
10 var element = document.getElementById("output");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected