about summary refs log tree commit homepage
path: root/lib/dtas/source/sox.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dtas/source/sox.rb')
-rw-r--r--lib/dtas/source/sox.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/dtas/source/sox.rb b/lib/dtas/source/sox.rb
index 99dfe35..91a3c40 100644
--- a/lib/dtas/source/sox.rb
+++ b/lib/dtas/source/sox.rb
@@ -38,13 +38,13 @@ class DTAS::Source::Sox # :nodoc:
     command_init(SOX_DEFAULTS)
   end
 
-  def try(infile, offset = nil)
+  def try(infile, offset = nil, trim = nil)
     err = ""
     cmd = %W(soxi -s #{infile})
     s = qx(@env.dup, cmd, err_str: err, no_raise: true)
     return if err =~ /soxi FAIL formats:/
     self.class.try_to_fail_harder(infile, s, cmd) or return
-    source_file_dup(infile, offset)
+    source_file_dup(infile, offset, trim)
   end
 
   def format
@@ -81,7 +81,7 @@ class DTAS::Source::Sox # :nodoc:
     e["INFILE"] = @infile
 
     # make sure these are visible to the "current" command...
-    e["TRIMFX"] = @offset ? "trim #@offset" : nil
+    e["TRIMFX"] = trimfx
     e["RGFX"] = rg_state.effect(self) || nil
     e.merge!(@rg.to_env) if @rg