mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
fix bug in hookEncodingProcess causing playRawStream to not work (#392)
* fix typo in hookEncodingProcess * proper fix for _this4 bug in src, use arrow functions * Get abalabahaha to build the noobs' changes
This commit is contained in:
committed by
abalabahaha
parent
750f2a2b1b
commit
a073010197
@@ -122,6 +122,8 @@ var AudioEncoder = (function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
AudioEncoder.prototype.hookEncodingProcess = function hookEncodingProcess(resolve, reject, enc, stream) {
|
AudioEncoder.prototype.hookEncodingProcess = function hookEncodingProcess(resolve, reject, enc, stream) {
|
||||||
|
var _this4 = this;
|
||||||
|
|
||||||
var processKilled = false;
|
var processKilled = false;
|
||||||
|
|
||||||
function killProcess(cause) {
|
function killProcess(cause) {
|
||||||
@@ -160,7 +162,7 @@ var AudioEncoder = (function () {
|
|||||||
this.volume.once("readable", function () {
|
this.volume.once("readable", function () {
|
||||||
var data = {
|
var data = {
|
||||||
proc: enc,
|
proc: enc,
|
||||||
stream: this.volume,
|
stream: _this4.volume,
|
||||||
channels: 2
|
channels: 2
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ export default class AudioEncoder {
|
|||||||
|
|
||||||
enc.stdout.pipe(this.volume);
|
enc.stdout.pipe(this.volume);
|
||||||
|
|
||||||
enc.stderr.on("data", function (data) {
|
enc.stderr.on("data", (data) => {
|
||||||
ffmpegErrors += "\n" + new Buffer(data).toString().trim();
|
ffmpegErrors += "\n" + new Buffer(data).toString().trim();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -148,7 +148,7 @@ export default class AudioEncoder {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.volume.once("readable", function () {
|
this.volume.once("readable", () => {
|
||||||
var data = {
|
var data = {
|
||||||
proc: enc,
|
proc: enc,
|
||||||
stream: this.volume,
|
stream: this.volume,
|
||||||
|
|||||||
Reference in New Issue
Block a user