diff options
author | Eric Wong <e@80x24.org> | 2015-05-10 10:12:34 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-05-10 11:21:56 +0000 |
commit | e6a2ff2a3984320b1b83f5051709880a8b9d3708 (patch) | |
tree | 497cb091d23c4f151c00d5ee068f44da0d97dbb1 /lib/dtas/splitfx.rb | |
parent | 03b1303b1c7511fdd1a6b2f63d7c509e822a6a38 (diff) | |
download | dtas-e6a2ff2a3984320b1b83f5051709880a8b9d3708.tar.gz |
generic targets (e.g. "wav") is useful for quickly checking if clipping is introduced by dither and resampling, so we'll support changing the sample rate and bits-per-sample from the command-line so users don't need to setup their own targets or wait on FLAC encoding.
Diffstat (limited to 'lib/dtas/splitfx.rb')
-rw-r--r-- | lib/dtas/splitfx.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/dtas/splitfx.rb b/lib/dtas/splitfx.rb index 5b04854..a14d221 100644 --- a/lib/dtas/splitfx.rb +++ b/lib/dtas/splitfx.rb @@ -57,6 +57,8 @@ class DTAS::SplitFX # :nodoc: @infile = nil @outdir = nil @compression = nil + @rate = nil + @bits = nil @targets = { "flac-cdda" => { "command" => CMD, @@ -157,6 +159,8 @@ class DTAS::SplitFX # :nodoc: def generic_target(target = "flac") outfmt = @infmt.dup outfmt.type = target + outfmt.bits = @bits if @bits + outfmt.rate = @rate if @rate { "command" => CMD, "format" => outfmt } end @@ -333,6 +337,8 @@ class DTAS::SplitFX # :nodoc: FileUtils.mkpath(@outdir) end @compression = opts[:compression] + @rate = opts[:rate] + @bits = opts[:bits] fails = [] tracks = @tracks.dup |