perf: avoid silk encoding blocking the main event loop (#527)
This commit is contained in:
1 parent
74b4d9bf49
commit
e44595334a
4 files changed
+44
-16
No files matched your search
@@ -0,0 +1,9 @@
|
||||
import { encode } from "silk-wasm";
|
||||
|
||||
export interface EncodeArgs {
|
||||
input: ArrayBufferView | ArrayBuffer
|
||||
sampleRate: number
|
||||
}
|
||||
export default async ({ input, sampleRate }: EncodeArgs) => {
|
||||
return await encode(input, sampleRate);
|
||||
};
|
||||
Reference in new issue
Block a user