opus is slow
This commit is contained in:
parent
03e433789e
commit
38a468a5cc
7 changed files with 5580 additions and 53 deletions
14
src/codec.js
14
src/codec.js
|
|
@ -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 }
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue