some voice fixes

This commit is contained in:
Amish Shah
2016-09-09 18:35:21 +01:00
parent f192d16b5b
commit b7204f33b9
2 changed files with 5 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@@ -38,6 +38,9 @@ class VoiceConnectionPlayer extends EventEmitter {
_shutdown() {
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);
}
@@ -46,6 +49,7 @@ class VoiceConnectionPlayer extends EventEmitter {
this._streamingData = this.dispatcher.streamingData;
this.emit('debug', 'cleaning up streams after end/error');
if (streams) {
this.processMap.delete(stream);
if (streams.inputStream && streams.pcmConverter) {
try {
if (streams.inputStream.unpipe) {