Add passes to streaming voice

This commit is contained in:
Amish Shah
2016-09-11 18:49:13 +01:00
parent d365eb95e2
commit 9059eb13a2
6 changed files with 26 additions and 17 deletions

View File

@@ -7,9 +7,9 @@ class DefaultPlayer extends BasePlayer {
return this.playStream(fs.createReadStream(file), options);
}
playStream(stream, { seek = 0, volume = 1 } = {}) {
playStream(stream, { seek = 0, volume = 1, passes = 1 } = {}) {
this._shutdown();
const options = { seek: seek, volume: volume };
const options = { seek, volume, passes };
const pcmStream = this.convertStream(stream, options);
const dispatcher = this.playPCMStream(pcmStream, options);
return dispatcher;