summaryrefslogtreecommitdiffstats
path: root/TOOLS/lua/acompressor.lua
diff options
context:
space:
mode:
Diffstat (limited to 'TOOLS/lua/acompressor.lua')
-rw-r--r--TOOLS/lua/acompressor.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/TOOLS/lua/acompressor.lua b/TOOLS/lua/acompressor.lua
index 5fc5063e8d..e94dc3e0fb 100644
--- a/TOOLS/lua/acompressor.lua
+++ b/TOOLS/lua/acompressor.lua
@@ -2,7 +2,7 @@
-- filter including key bindings for adjusting parameters.
--
-- See https://ffmpeg.org/ffmpeg-filters.html#acompressor for explanation
--- of the parameteres.
+-- of the parameters.
local mp = require 'mp'
local options = require 'mp.options'
@@ -53,8 +53,10 @@ local params = {
}
local function parse_value(value)
- -- Using nil here because tonumber differs between lua 5.1 and 5.2 when parsing fractions in combination with explicit base argument set to 10.
- -- And we can't omit it because gsub returns 2 values which would get unpacked and cause more problems. Gotta love scripting languages.
+ -- Using nil here because tonumber differs between lua 5.1 and 5.2 when
+ -- parsing fractions in combination with explicit base argument set to 10.
+ -- And we can't omit it because gsub returns 2 values which would get
+ -- unpacked and cause more problems. Gotta love scripting languages.
return tonumber(value:gsub('dB$', ''), nil)
end
@@ -76,7 +78,8 @@ local function show_osd(filter)
for _,param in ipairs(params) do
local value = parse_value(filter.params[param.name])
if not (param.hide_default and value == o['default_' .. param.name]) then
- pretty[#pretty+1] = string.format('%s: %g%s', param.name:gsub("^%l", string.upper), value, param.dB)
+ pretty[#pretty+1] = string.format('%s: %g%s', param.name:gsub("^%l", string.upper),
+ value, param.dB)
end
end