Files
NapCatQQ/src/common/audio-worker.ts
pk5ls20 e44595334a
Some checks failed
Build Action / Build-LiteLoader (push) Failing after 13s
Build Action / Build-Shell (push) Failing after 12s
perf: avoid silk encoding blocking the main event loop (#527)
2024-11-15 20:39:18 +08:00

10 lines
242 B
TypeScript

import { encode } from "silk-wasm";
export interface EncodeArgs {
input: ArrayBufferView | ArrayBuffer
sampleRate: number
}
export default async ({ input, sampleRate }: EncodeArgs) => {
return await encode(input, sampleRate);
};