opus is slow

This commit is contained in:
rustdesk 2022-02-06 03:13:41 +08:00
parent 03e433789e
commit 38a468a5cc
7 changed files with 5580 additions and 53 deletions

View file

@ -40,18 +40,4 @@ export async function loadVp9(callback) {
},
{ worker: true, threading: true }
);
}
export function loadOpus(callback, channels, rate) {
window.OGVLoader.loadClass(
"OGVDecoderAudioOpusW",
(audioCodecClass) => {
audioCodecClass({ audioFormat: { channels, rate } }).then((decoder) => {
decoder.init(() => {
callback(decoder);
})
})
},
{ worker: true }
);
}