Make grammer gooder

This commit is contained in:
Schuyler Cebulskie
2016-09-11 01:40:37 -04:00
parent 0833500d60
commit 47d71d32f3
15 changed files with 57 additions and 61 deletions

View File

@@ -50,30 +50,30 @@ class VoiceConnectionPlayer extends EventEmitter {
killStream(stream) {
const streams = this.processMap.get(stream);
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) {
this.processMap.delete(stream);
if (streams.inputStream && streams.pcmConverter) {
try {
if (streams.inputStream.unpipe) {
streams.inputStream.unpipe(streams.pcmConverter.stdin);
this.emit('debug', 'stream kill part 4/5 pass');
this.emit('debug', 'Stream kill part 4/5 pass');
}
if (streams.pcmConverter.stdout.destroy) {
streams.pcmConverter.stdout.destroy();
this.emit('debug', 'stream kill part 2/5 pass');
this.emit('debug', 'Stream kill part 2/5 pass');
}
if (streams.pcmConverter && streams.pcmConverter.kill) {
streams.pcmConverter.kill('SIGINT');
this.emit('debug', 'stream kill part 3/5 pass');
this.emit('debug', 'Stream kill part 3/5 pass');
}
if (streams.pcmConverter.stdin) {
streams.pcmConverter.stdin.end();
this.emit('debug', 'stream kill part 1/5 pass');
this.emit('debug', 'Stream kill part 1/5 pass');
}
if (streams.inputStream.destroy) {
streams.inputStream.destroy();
this.emit('debug', 'stream kill part 5/5 pass');
this.emit('debug', 'Stream kill part 5/5 pass');
}
} catch (err) {
return err;