about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-05-10 09:33:40 +0000
committerEric Wong <e@80x24.org>2015-05-10 09:36:50 +0000
commit03b1303b1c7511fdd1a6b2f63d7c509e822a6a38 (patch)
tree58ec1c2104682a9ee28281db33a5729a2046e8a6 /lib
parentd3e2d5cfa8ab2c4e8f65ac6b2bdb6212b8b4ea8b (diff)
downloaddtas-03b1303b1c7511fdd1a6b2f63d7c509e822a6a38.tar.gz
This can be useful for speeding up splitfx during development,
as sox defaults to maximum compression with FLAC and that is
extremely slow.
Diffstat (limited to 'lib')
-rw-r--r--lib/dtas/splitfx.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/dtas/splitfx.rb b/lib/dtas/splitfx.rb
index 3f673ee..5b04854 100644
--- a/lib/dtas/splitfx.rb
+++ b/lib/dtas/splitfx.rb
@@ -56,6 +56,7 @@ class DTAS::SplitFX # :nodoc:
     @t2s = method(:t2s)
     @infile = nil
     @outdir = nil
+    @compression = nil
     @targets = {
       "flac-cdda" => {
         "command" => CMD,
@@ -196,7 +197,9 @@ class DTAS::SplitFX # :nodoc:
     end
     env["COMMENTS"] = "--comment-file=#{comments.path}"
     infile_env(env, @infile)
-    env["OUTFMT"] = xs(outfmt.to_sox_arg)
+    outarg = outfmt.to_sox_arg
+    outarg << "-C#@compression" if @compression
+    env["OUTFMT"] = xs(outarg)
     env["SUFFIX"] = outfmt.type
     env["OUTDIR"] = @outdir ? "#@outdir/".squeeze('/') : ''
     env.merge!(t.env)
@@ -329,6 +332,7 @@ class DTAS::SplitFX # :nodoc:
       require 'fileutils'
       FileUtils.mkpath(@outdir)
     end
+    @compression = opts[:compression]
 
     fails = []
     tracks = @tracks.dup