From 974854f21a1787a62b4cf8d7716c65f3712819df Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 9 Apr 2020 20:12:22 +0000 Subject: splitfx: support --err-suffix option Write the contents of "stderr". This is useful for capturing the per-track output of the sox(1) "stats" effect when combined with parallel "--jobs". --- bin/dtas-splitfx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bin/dtas-splitfx') diff --git a/bin/dtas-splitfx b/bin/dtas-splitfx index d041679..3ee812e 100755 --- a/bin/dtas-splitfx +++ b/bin/dtas-splitfx @@ -23,6 +23,9 @@ OptionParser.new('', 24, ' ') do |op| end op.on('-b', '--bits RATE', Integer) { |val| opts[:bits] = val } op.on('-t', '--trim POSITION') { |val| opts[:trim] = val.tr(',', ' ') } + op.on('-E', '--err-suffix SUFFIX') do |val| + opts[:err_suffix] = val.start_with?('.') ? val.freeze : ".#{val}" + end op.on('-p', '--sox-pipe') do opts[:sox_pipe] = true default_target = 'sox' @@ -30,6 +33,10 @@ OptionParser.new('', 24, ' ') do |op| op.parse!(ARGV) end +if opts[:sox_pipe] && opts[:err_suffix] + abort '--err-suffix and --sox-pipe are mutually exclusive' +end + args = [] ARGV.each do |arg| case arg -- cgit v1.2.3-24-ge0c7