diff options
author | Eric Wong <e@80x24.org> | 2015-01-28 07:44:05 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-01-28 07:47:57 +0000 |
commit | 37eae22446feb5a805d9cd59f6ad54362829189f (patch) | |
tree | 50172ce0b549fb9a0eae1e2e0b4d6bc47bc3a8d6 /lib/dtas/source/sox.rb | |
parent | ead7725fa693c7dd832b22f77b32847c81a70d72 (diff) | |
download | dtas-37eae22446feb5a805d9cd59f6ad54362829189f.tar.gz |
This feature is intended to allow users to "zoom-in" on a particular portion of a track to tweak parameters (either with dtas-sourceedit(1) or via playback of splitfx YAML files). This may be combined with looping the tracklist (via "tl repeat").
Diffstat (limited to 'lib/dtas/source/sox.rb')
-rw-r--r-- | lib/dtas/source/sox.rb | 6 |
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 |