From dba7a1d06a546f0f34c7b870140253fbdf6faeb4 Mon Sep 17 00:00:00 2001 From: Jacob Date: Thu, 7 Jan 2016 02:18:03 -0500 Subject: [PATCH] fixed volume option and set default to 25% to avoid hearing loss --- src/Voice/AudioEncoder.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Voice/AudioEncoder.js b/src/Voice/AudioEncoder.js index 95a16f3c3..776ca96aa 100644 --- a/src/Voice/AudioEncoder.js +++ b/src/Voice/AudioEncoder.js @@ -65,9 +65,9 @@ export default class AudioEncoder { '-i', '-', '-f', 's16le', '-ar', '48000', + '-af', 'volume=' + (options.volume || 0.25), '-ac', 2, - 'pipe:1', - '-af', 'volume=' + (options.volume || 1) + 'pipe:1' ], {stdio: ['pipe', 'pipe', 'ignore']}); stream.pipe(enc.stdin); @@ -99,9 +99,9 @@ export default class AudioEncoder { '-i', file, '-f', 's16le', '-ar', '48000', + '-af', 'volume=' + (options.volume || 0.25), '-ac', 2, - 'pipe:1', - '-af', '"volume=' + (options.volume || 1)+'"' + 'pipe:1' ], { stdio: ['pipe', 'pipe', 'ignore'] }); enc.stdout.once("readable", function () {