From: Eric Wong <e@80x24.org>
To: <dtas-all@nongnu.org>
Cc: Eric Wong <e@80x24.org>
Subject: [PATCH] splitfx: avoid double-truncation with user command
Date: Tue, 19 May 2015 08:18:31 +0000 [thread overview]
Message-ID: <1432023511-2581-1-git-send-email-e@80x24.org> (raw)
It's probably harmless as the sub (second) command is usually
innocuous as fars a modifying dynamic range, but it makes the
command-line output confusing.
---
lib/dtas/splitfx.rb | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/lib/dtas/splitfx.rb b/lib/dtas/splitfx.rb
index 6bac27f..5a1431a 100644
--- a/lib/dtas/splitfx.rb
+++ b/lib/dtas/splitfx.rb
@@ -177,9 +177,6 @@ class DTAS::SplitFX # :nodoc:
# as a self-describing format to the actual encoding instances
player_cmd = @command
suffix = outfmt.type
- if player_cmd && generic
- outfmt.type = 'sox'
- end
env = outfmt.to_env
# set very high quality resampling if using 24-bit or higher output
@@ -223,8 +220,15 @@ class DTAS::SplitFX # :nodoc:
# target-specific commands like a dtas-player sink:
# @command | (INFILE= FX= TRIMFX=; target['command'])
if player_cmd
- sub_env = { 'INFILE' => '-', 'FX' => '', 'TRIMFX' => '' }
+ sub_env = {
+ 'INFILE' => '-p',
+ 'FX' => '',
+ 'TRIMFX' => '',
+ 'SOXFMT' => ''
+ }
sub_env_s = sub_env.inject("") { |s,(k,v)| s << "#{k}=#{v} " }
+ env['SOXFMT'] = '-tsox'
+ sub_env['OUTFMT'] = env.delete('OUTFMT')
show_cmd = [ _expand_cmd(env, player_cmd), '|', '(', "#{sub_env_s};",
_expand_cmd(env.merge(sub_env), command), ')' ].flatten
command = "#{player_cmd} | (#{sub_env_s}; #{command})"
--
EW
reply other threads:[~2015-05-19 8:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://80x24.org/dtas/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1432023511-2581-1-git-send-email-e@80x24.org \
--to=e@80x24.org \
--cc=dtas-all@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
http://80x24.org/dtas.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).