diff options
author | Eric Wong <e@80x24.org> | 2022-02-03 00:48:20 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-02-03 05:01:57 +0000 |
commit | ae9a82827cea84c23e721178baa4a3445393f75a (patch) | |
tree | 3588e004e20a48214aee0b9be011bc67af4a2783 | |
parent | d36499b8edf620230be35bb43c65a619a63046cb (diff) | |
download | dtas-ae9a82827cea84c23e721178baa4a3445393f75a.tar.gz |
They're two different ways of accomplishing roughly the same thing, but --filter can be more flexible given the use of per-track environment variables.
-rw-r--r-- | lib/dtas/splitfx.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/dtas/splitfx.rb b/lib/dtas/splitfx.rb index 696b9ce..c7eaf42 100644 --- a/lib/dtas/splitfx.rb +++ b/lib/dtas/splitfx.rb @@ -1,4 +1,4 @@ -# Copyright (C) 2013-2020 all contributors <dtas-all@nongnu.org> +# Copyright (C) all contributors <dtas-all@nongnu.org> # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt> # frozen_string_literal: true require_relative '../dtas' @@ -357,7 +357,9 @@ class DTAS::SplitFX # :nodoc: @rate = opts[:rate] @bits = opts[:bits] trim = opts[:trim] and @tracks = [ UTrim.new(trim, @env, @comments) ] - + if trim && opts[:filter] + raise ArgumentError, 'trim and filter are mutually exclusive' + end fails = [] tracks = @tracks.dup (opts[:filter] || []).each do |re| |