fix some voice stuff

This commit is contained in:
Amish Shah
2016-08-25 14:49:10 +01:00
parent 7b2d76429f
commit 6d7e649bb1
4 changed files with 12 additions and 5 deletions

View File

@@ -5,8 +5,12 @@ class DefaultPlayer extends BasePlayer {
playFile(file) {
this._shutdown();
const fileStream = fs.createReadStream(file);
const pcmStream = this.convertStream(fileStream);
return this.playStream(fs.createReadStream(file));
}
playStream(stream) {
this._shutdown();
const pcmStream = this.convertStream(stream);
const dispatcher = this.playPCMStream(pcmStream);
return dispatcher;
}