diff options
author | Eric Wong <e@80x24.org> | 2015-06-03 10:16:58 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-06-03 10:16:58 +0000 |
commit | ee3c6d6e91d3bda8e576ce79aca9b283eca7bf9d (patch) | |
tree | 95f1d2d0987763c3b1f69064b79415285c933ce8 /bin | |
parent | 741bb52962c874ddc5ad72bdac8a183e49c8abe9 (diff) | |
download | dtas-ee3c6d6e91d3bda8e576ce79aca9b283eca7bf9d.tar.gz |
We'll be using the rate for automatically calculating CDDA alignment in the future.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/dtas-splitfx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/dtas-splitfx b/bin/dtas-splitfx index fc8cc69..08c0111 100755 --- a/bin/dtas-splitfx +++ b/bin/dtas-splitfx @@ -16,7 +16,10 @@ OptionParser.new('', 24, ' ') do |op| op.on('-D', '--no-dither') { opts[:no_dither] = true } op.on('-O', '--outdir OUTDIR') { |val| opts[:outdir] = val } op.on('-C', '--compression FACTOR') { |val| opts[:compression] = val } - op.on('-r', '--rate RATE') { |val| opts[:rate] = val } + op.on('-r', '--rate RATE') do |val| + mult = val.sub!(/k\z/, '') ? 1000 : 1 + opts[:rate] = (val.to_f * mult).to_i + end op.on('-b', '--bits RATE', Integer) { |val| opts[:bits] = val } op.on('-t', '--trim POSITION') { |val| opts[:trim] = val.tr(',', ' ') } op.on('-p', '--sox-pipe') do |