maybe fix voice idk

This commit is contained in:
Amish Shah
2016-09-09 18:45:27 +01:00
parent b7204f33b9
commit 4278a37e3c
2 changed files with 5 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@@ -28,7 +28,10 @@ class VoiceConnectionPlayer extends EventEmitter {
const options = { seek: seek, volume: volume };
const encoder = this.converterEngine.createConvertStream(options.seek);
const pipe = stream.pipe(encoder.stdin);
pipe.on('unpipe', () => pipe.destroy());
pipe.on('unpipe', () => {
this.killStream(encoder.stdout);
pipe.destroy();
});
this.processMap.set(encoder.stdout, {
pcmConverter: encoder,
inputStream: stream,