about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-05-10 08:50:07 +0000
committerEric Wong <e@80x24.org>2015-05-10 08:51:16 +0000
commit1e7eeebd9d6b2cdce7a803fcce8a50310482905c (patch)
treed7af63216755c2d041a619cb6f4de5e6eae6fa5b /lib
parentb6515b3a8abab6dcc56166da825e01e2c083bfc9 (diff)
downloaddtas-1e7eeebd9d6b2cdce7a803fcce8a50310482905c.tar.gz
We do not need to dither unless we output to 16-bit or less.
This bug caused us to unnecessarily apply dither on 24-bit
output files.  Oops!
Diffstat (limited to 'lib')
-rw-r--r--lib/dtas/splitfx.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dtas/splitfx.rb b/lib/dtas/splitfx.rb
index 6271fb0..208ff67 100644
--- a/lib/dtas/splitfx.rb
+++ b/lib/dtas/splitfx.rb
@@ -184,7 +184,7 @@ class DTAS::SplitFX # :nodoc:
     # add noise-shaped dither for 16-bit (sox manual seems to recommend this)
     if opts[:no_dither]
       env["SOX_OPTS"] = "#{ENV["SOX_OPTS"]} -D"
-    else outfmt.bits && outfmt.bits <= 16
+    elsif outfmt.bits && outfmt.bits <= 16
       env["DITHERFX"] = "dither -s"
     end
     comments = Tempfile.new(%W(dtas-splitfx-#{t.comments["TRACKNUMBER"]} .txt))