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=-4.9 required=3.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI 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 7CA1F63381C for ; Sun, 28 Dec 2014 04:12:23 +0000 (UTC) Received: from localhost ([::1]:57573 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y55DK-0000lp-RN for dtas-all@80x24.org; Sat, 27 Dec 2014 23:12:22 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y55DI-0000lY-T8 for dtas-all@nongnu.org; Sat, 27 Dec 2014 23:12:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y55DC-0003qH-Oq for dtas-all@nongnu.org; Sat, 27 Dec 2014 23:12:20 -0500 Received: from dcvr.yhbt.net ([64.71.152.64]:45995) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y55DC-0003qD-Ip for dtas-all@nongnu.org; Sat, 27 Dec 2014 23:12:14 -0500 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 3314E63381B; Sun, 28 Dec 2014 04:12:13 +0000 (UTC) From: Eric Wong To: Subject: [PATCH] source/splitfx: standardize on $FX for sox effects Date: Sun, 28 Dec 2014 04:12:04 +0000 Message-Id: <1419739924-23982-2-git-send-email-e@80x24.org> X-Mailer: git-send-email 2.1.2.571.ged78782.dirty 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 This should allow users to setup effects in a more standardized fashion and avoid needing to specify a "command:" field in their splitfx YAML files in the general case. --- examples/splitfx.sample.yml | 5 +++-- lib/dtas/source/splitfx.rb | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/splitfx.sample.yml b/examples/splitfx.sample.yml index 3826012..c1b5872 100644 --- a/examples/splitfx.sample.yml +++ b/examples/splitfx.sample.yml @@ -11,8 +11,9 @@ comments: ARTIST: John Smith ALBUM: Hello World YEAR: 2013 -# override the normal sox command for dtas-player playback: -command: exec sox "$INFILE" $SOXFMT - $TRIMFX $RGFX $FX +# the sox command for dtas-player playback, there is no need to +# specify this as it is the default: +# command: exec sox "$INFILE" $SOXFMT - $TRIMFX $RGFX $FX env: # these effects may be used in any command in this file, including targets FX: diff --git a/lib/dtas/source/splitfx.rb b/lib/dtas/source/splitfx.rb index a0899f3..fee27fd 100644 --- a/lib/dtas/source/splitfx.rb +++ b/lib/dtas/source/splitfx.rb @@ -10,7 +10,10 @@ class DTAS::Source::SplitFX < DTAS::Source::Sox # :nodoc: attr_writer :sox include DTAS::Source::Watchable if defined?(DTAS::Source::Watchable) - SPLITFX_DEFAULTS = SOX_DEFAULTS.merge("tryorder" => 3) + SPLITFX_DEFAULTS = SOX_DEFAULTS.merge( + "command" => "#{SOX_DEFAULTS["command"]} $FX", + "tryorder" => 3, + ) def initialize(sox = DTAS::Source::Sox.new) command_init(SPLITFX_DEFAULTS) @@ -52,7 +55,7 @@ class DTAS::Source::SplitFX < DTAS::Source::Sox # :nodoc: end def command_string - @ymlhash["command"] || @sox.command_string + @ymlhash["command"] || super end def spawn(player_format, rg_state, opts) -- EW