mirror of
https://github.com/danbulant/discord.js
synced 2026-06-18 22:21:17 +00:00
fixed volume option and set default to 25% to avoid hearing loss
This commit is contained in:
parent
68435f0619
commit
dba7a1d06a
1 changed files with 4 additions and 4 deletions
|
|
@ -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 () {
|
||||
|
|
|
|||
Loading…
Reference in a new issue