From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 208.118.235.0/24 X-Spam-Status: No, score=-2.2 required=3.0 tests=AWL,BAYES_00 shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: dtas-all@80x24.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id CDFD41F48C for ; Sat, 6 Jun 2015 04:10:10 +0000 (UTC) Received: from localhost ([::1]:50441 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z15Qv-0001j6-Rk for dtas-all@80x24.org; Sat, 06 Jun 2015 00:10:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z15Qt-0001hS-Mf for dtas-all@nongnu.org; Sat, 06 Jun 2015 00:10:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z15Qq-0003Kg-Go for dtas-all@nongnu.org; Sat, 06 Jun 2015 00:10:07 -0400 Received: from dcvr.yhbt.net ([64.71.152.64]:41842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z15Qq-0003Hj-Ay for dtas-all@nongnu.org; Sat, 06 Jun 2015 00:10:04 -0400 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 5821F1F48C; Sat, 6 Jun 2015 04:10:02 +0000 (UTC) From: Eric Wong To: Subject: [PATCH] splitfx: ensure rate is an integer Date: Sat, 6 Jun 2015 04:10:00 +0000 Message-Id: <1433563800-31714-1-git-send-email-e@80x24.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 64.71.152.64 Cc: Eric Wong X-BeenThere: dtas-all@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dtas-all-bounces+dtas-all=80x24.org@nongnu.org Sender: dtas-all-bounces+dtas-all=80x24.org@nongnu.org We'll be using the rate for automatically calculating CDDA alignment in the future. --- bin/dtas-splitfx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- EW