switch to libopus 1.3.1

This commit is contained in:
skdhg committed 2023-08-06 23:00:20 +05:45
1 parent 2043d09058
commit 157bee33a6
400 files changed
+99699 -20

No files matched your search

+45 -1
View File
@@ -57,10 +57,54 @@ console.log(result);
```js
const { OpusEncoder, getOpusVersion } = require('mediaplex');
console.log(getOpusVersion()); // libopus 1.4-6-g9fc8fc4c
console.log(getOpusVersion()); // libopus ...
const encoder = new OpusEncoder(48000, 2);
const encoded = encoder.encode(buffer);
const decoded = encoder.decode(encoded);
```
#### Opus Benchmarks
```js
$ yarn benchmark
Running "OpusEncoder Benchmark" suite...
Progress: 100%
mediaplex:
3 305 ops/s, ±0.15% | 21.18% slower
@discordjs/opus:
3 174 ops/s, ±0.09% | 24.3% slower
opusscript:
4 193 ops/s, ±0.16% | fastest
opusscript (no wasm):
260 ops/s, ±0.55% | slowest, 93.8% slower
Finished 4 cases!
Fastest: opusscript
Slowest: opusscript (no wasm)
Running "OpusDecoder Benchmark" suite...
Progress: 100%
mediaplex:
11 441 ops/s, ±0.99% | 3.21% slower
@discordjs/opus:
11 821 ops/s, ±0.55% | fastest
opusscript:
6 095 ops/s, ±0.27% | 48.44% slower
opusscript (no wasm):
2 584 ops/s, ±0.52% | slowest, 78.14% slower
Finished 4 cases!
Fastest: @discordjs/opus
Slowest: opusscript (no wasm)
```