Skip to content

Commit

Permalink
fix(VoiceReceiver): delete opus encoder from map in stoppedSpeaking (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceEEC authored Oct 27, 2019
1 parent 7011c51 commit 91600a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client/voice/receiver/VoiceReceiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class VoiceReceiver extends EventEmitter {
}
if (opusEncoder) {
opusEncoder.destroy();
this.opusEncoders.delete(user.id);
}
}

Expand All @@ -132,7 +133,7 @@ class VoiceReceiver extends EventEmitter {

/**
* Creates a readable stream for a user that provides PCM data while the user is speaking. When the user
* stops speaking, the stream is destroyed. The stream is 32-bit signed stereo PCM at 48KHz.
* stops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.
* @param {UserResolvable} user The user to create the stream for
* @returns {ReadableStream}
*/
Expand Down

0 comments on commit 91600a6

Please # to comment.