diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-08-29 09:52:26 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-08-29 09:52:26 +0000 |
commit | 91caa09c2e4021dcda1af79360527d0f15b2a4cd (patch) | |
tree | e9e7ed93caa03f2715cb21c1e9fb01a6e180d043 /lib | |
parent | 0f73acc225656517526b317a05ecab7e1311141b (diff) | |
download | dtas-91caa09c2e4021dcda1af79360527d0f15b2a4cd.tar.gz |
No need to add the vol effect if it's going to be a noop.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dtas/rg_state.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/dtas/rg_state.rb b/lib/dtas/rg_state.rb index a6c56f5..1cf97c7 100644 --- a/lib/dtas/rg_state.rb +++ b/lib/dtas/rg_state.rb @@ -74,8 +74,10 @@ class DTAS::RGState # :nodoc: # tag slips into the queue def rg_fallback_effect(reason) @fallback_gain or return + val = @fallback_gain + @preamp + return if val.abs < @gain_threshold warn(reason) if $DEBUG - "vol #{@fallback_gain + @preamp}dB" + "vol #{val}dB" end # returns an array (for command-line argument) for the effect needed |