diff options
author | Eric Wong <e@80x24.org> | 2015-05-17 02:00:47 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-05-17 02:19:58 +0000 |
commit | 93ff56a7a27a166ce92307c470d4f54c3c28aa53 (patch) | |
tree | 2981db2a951cd1f4f61c259dbbfe3bf5621d553f /lib/dtas/splitfx.rb | |
parent | 8705ec176fc03314da215af2d17935b3178f83d9 (diff) | |
download | dtas-93ff56a7a27a166ce92307c470d4f54c3c28aa53.tar.gz |
It can often be useful to expose only part of a track for quick inspection. This lets us do that.
Diffstat (limited to 'lib/dtas/splitfx.rb')
-rw-r--r-- | lib/dtas/splitfx.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/dtas/splitfx.rb b/lib/dtas/splitfx.rb index e4997cc..b657179 100644 --- a/lib/dtas/splitfx.rb +++ b/lib/dtas/splitfx.rb @@ -16,6 +16,14 @@ class DTAS::SplitFX # :nodoc: include DTAS::XS attr_reader :infile, :env + class UTrim + attr_reader :env, :comments + def initialize(trim_arg, env, comments) + @env = env.merge("TRIMFX" => "trim #{trim_arg}") + @comments = comments.merge('TRACKNUMBER' => '000') + end + end + class Skip < Struct.new(:tbeg) # :nodoc: def commit(_) # noop @@ -353,6 +361,7 @@ class DTAS::SplitFX # :nodoc: @compression = opts[:compression] @rate = opts[:rate] @bits = opts[:bits] + trim = opts[:trim] and @tracks = [ UTrim.new(trim, @env, @comments) ] fails = [] tracks = @tracks.dup |