mirror of
https://github.com/danbulant/discord.js
synced 2026-05-26 21:42:05 +00:00
some voice fixes
This commit is contained in:
parent
f192d16b5b
commit
b7204f33b9
2 changed files with 5 additions and 1 deletions
File diff suppressed because one or more lines are too long
|
|
@ -38,6 +38,9 @@ class VoiceConnectionPlayer extends EventEmitter {
|
||||||
|
|
||||||
_shutdown() {
|
_shutdown() {
|
||||||
this.speaking = false;
|
this.speaking = false;
|
||||||
|
if (this.dispatcher) {
|
||||||
|
this.dispatcher._triggerTerminalState('end', 'ended by parent player shutdown');
|
||||||
|
}
|
||||||
for (const stream of this.processMap.keys()) this.killStream(stream);
|
for (const stream of this.processMap.keys()) this.killStream(stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -46,6 +49,7 @@ class VoiceConnectionPlayer extends EventEmitter {
|
||||||
this._streamingData = this.dispatcher.streamingData;
|
this._streamingData = this.dispatcher.streamingData;
|
||||||
this.emit('debug', 'cleaning up streams after end/error');
|
this.emit('debug', 'cleaning up streams after end/error');
|
||||||
if (streams) {
|
if (streams) {
|
||||||
|
this.processMap.delete(stream);
|
||||||
if (streams.inputStream && streams.pcmConverter) {
|
if (streams.inputStream && streams.pcmConverter) {
|
||||||
try {
|
try {
|
||||||
if (streams.inputStream.unpipe) {
|
if (streams.inputStream.unpipe) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue