Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Extra debug info on failure, not sure what's going on with ecasound

  • Loading branch information...
commit 24e0ef52761be77fc55a27b13de6e5e4d69b9d42 1 parent 64e6f8a
James Harrison authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 app/jobs/normalize_job.rb
View
8 app/jobs/normalize_job.rb
@@ -97,10 +97,10 @@ def perform
end
end
if gain != 0.0
- u.atl("INFO", "NormalizeJob: Adjusting gain by #{gain.inspect}")
+ final_in_path = File.exists?(eca_path) ? eca_path : in_path
+ u.atl("INFO", "NormalizeJob: Adjusting gain by #{gain.inspect} on #{final_in_path}")
begin
ecaout = ''
- final_in_path = File.exists?(eca_path) ? eca_path : in_path
if gain > 0.0
# First let's analyse the file
max_gain_increase = 0
@@ -112,8 +112,10 @@ def perform
u.atl("WARN", "Unable to determine max gain increase from ecasound - #{e.inspect} - #{ecaout}")
end
if gain > max_gain_increase
- u.atl("WARN", "Reducing gain change to avoid clipping")
gain = max_gain_increase
+ u.atl("WARN", "Reducing gain change to avoid clipping - new increase #{gain}")
+ else
+ u.atl("INFO", "Okay to change gain without fear of clipping")
end
IO.popen(['ecasound', '-i', final_in_path, '-o', out_path, "-eadb:#{gain.to_s}"]){|io|ecaout = io.read}
else
Please sign in to comment.
Something went wrong with that request. Please try again.