Fixed audio stopping bug

- Added basic noisegate
- Handling more voice connection statuses
This commit is contained in:
Logan Cusano
2023-05-06 14:09:09 -04:00
parent d1a8059cb9
commit 4fbed169ab
3 changed files with 81 additions and 15 deletions

View File

@@ -67,7 +67,7 @@ async function createAudioInstance() {
sampleFormat: portAudio.SampleFormat16Bit,
sampleRate: 48000,
deviceId: selectedDevice.id, // Use -1 or omit the deviceId to select the default device
closeOnError: true, // Close the stream if an audio error is detected, if set false then just log the error
closeOnError: false, // Close the stream if an audio error is detected, if set false then just log the error
framesPerBuffer: 20, //(48000 / 1000) * 20, //(48000 * 16 * 2) / 1000 * 20 // (48000 * (16 / 8) * 2) / 60 / 1000 * 20 //0.025 * 48000 / 2
highwaterMark: 3840,
},