Open
Description
Please describe the problem you are having in as much detail as possible:
When i try to construct the Method OpusEncoder
node exits with errno 4294930435
or with Error: Cannot create a Buffer larger than 0x100000000 bytes
.
The first one occurs only when rate is set to 32000
on the constructor and the scond on on every other rate
Include a reproducible code sample here, if possible:
just construct OpusEncoder.
import Microphone from 'node-microphone'
import { io } from 'socket.io-client'
import { OpusEncoder } from '@discordjs/opus'
const socket = io("http://localhost:3000");
const encoder = new OpusEncoder(16000, 2);
var mic = new Microphone({
bitwidth: 16,
channels: 1,
rate: 32000,
encoding: 'unsigned-integer',
endian: 'big'
});
var micStream = mic.startRecording();
micStream.on('data', (data) => {
var encodedData = encoder.encode(data);
console.log(encodedData);
socket.emit('stream', data);
});
Further details:
the problem occurs in line 6
-
@discordjs/opus version:
-
Node.js version: 15.3.0
-
Operating system: Windows 10 Pro 64bit
-
Priority this issue should have – please be realistic and elaborate if possible:
medium