()
| 131 | let encoderFactoryPromise: Promise<() => WasmOpusEncoder> | undefined; |
| 132 | |
| 133 | async function getEncoderFactory(): Promise<() => WasmOpusEncoder> { |
| 134 | if (!encoderFactoryPromise) { |
| 135 | encoderFactoryPromise = wasmInstancePromise.then((instance) => { |
| 136 | const wasm = instance.exports as unknown as OpusExports; |
| 137 | return () => new WasmOpusEncoder(wasm); |
| 138 | }); |
| 139 | } |
| 140 | |
| 141 | return encoderFactoryPromise; |
| 142 | } |
| 143 | |
| 144 | function concatBytes(left: Uint8Array, right: Uint8Array): Uint8Array { |
| 145 | const out = new Uint8Array(left.length + right.length); |
no outgoing calls
no test coverage detected