mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
Fixed playingFiles
This commit is contained in:
@@ -97,7 +97,7 @@ var AudioEncoder = (function () {
|
|||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
var enc = cpoc.spawn(self.getChoice(), ["-f", "s16le", "-ar", "48000", "-ac", "1", // this can be 2 but there's no point, discord makes it mono on playback, wasted bandwidth.
|
var enc = cpoc.spawn(self.getCommand(), ["-f", "s16le", "-ar", "48000", "-ac", "1", // this can be 2 but there's no point, discord makes it mono on playback, wasted bandwidth.
|
||||||
"-af", "volume=1", "pipe:1", "-i", file]);
|
"-af", "volume=1", "pipe:1", "-i", file]);
|
||||||
|
|
||||||
enc.stdout.once("readable", function () {
|
enc.stdout.once("readable", function () {
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ class AudioEncoder{
|
|||||||
encodeFile(file, callback=function(err, buffer){}){
|
encodeFile(file, callback=function(err, buffer){}){
|
||||||
var self = this;
|
var self = this;
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
var enc = cpoc.spawn(self.getChoice() , [
|
var enc = cpoc.spawn(self.getCommand() , [
|
||||||
"-f", "s16le",
|
"-f", "s16le",
|
||||||
"-ar", "48000",
|
"-ar", "48000",
|
||||||
"-ac", "1", // this can be 2 but there's no point, discord makes it mono on playback, wasted bandwidth.
|
"-ac", "1", // this can be 2 but there's no point, discord makes it mono on playback, wasted bandwidth.
|
||||||
|
|||||||
Reference in New Issue
Block a user