Build stuff

This commit is contained in:
abalabahaha
2016-01-20 22:27:16 -08:00
parent dba7a1d06a
commit b49870f12f

View File

@@ -81,7 +81,7 @@ var AudioEncoder = (function () {
AudioEncoder.prototype.encodeStream = function encodeStream(stream, options) {
var self = this;
return new Promise(function (resolve, reject) {
var enc = _child_process2["default"].spawn(self.getCommand(), ['-loglevel', '0', '-i', '-', '-f', 's16le', '-ar', '48000', '-ac', 2, 'pipe:1', '-af', 'volume=' + (options.volume || 1)], { stdio: ['pipe', 'pipe', 'ignore'] });
var enc = _child_process2["default"].spawn(self.getCommand(), ['-loglevel', '0', '-i', '-', '-f', 's16le', '-ar', '48000', '-af', 'volume=' + (options.volume || 0.25), '-ac', 2, 'pipe:1'], { stdio: ['pipe', 'pipe', 'ignore'] });
stream.pipe(enc.stdin);
@@ -107,7 +107,7 @@ var AudioEncoder = (function () {
AudioEncoder.prototype.encodeFile = function encodeFile(file, options) {
var self = this;
return new Promise(function (resolve, reject) {
var enc = _child_process2["default"].spawn(self.getCommand(), ['-loglevel', '0', '-i', file, '-f', 's16le', '-ar', '48000', '-ac', 2, 'pipe:1', '-af', '"volume=' + (options.volume || 1) + '"'], { stdio: ['pipe', 'pipe', 'ignore'] });
var enc = _child_process2["default"].spawn(self.getCommand(), ['-loglevel', '0', '-i', file, '-f', 's16le', '-ar', '48000', '-af', 'volume=' + (options.volume || 0.25), '-ac', 2, 'pipe:1'], { stdio: ['pipe', 'pipe', 'ignore'] });
enc.stdout.once("readable", function () {
resolve({