about summary refs log tree commit homepage
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dtas-splitfx7
1 files changed, 7 insertions, 0 deletions
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