everything related to duct tape audio suite (dtas)
 help / color / Atom feed
* [PATCH] splitfx: avoid double-truncation with user command
@ 2015-05-19  8:18 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2015-05-19  8:18 UTC (permalink / raw)
  To: dtas-all; +Cc: Eric Wong

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-19  8:18 [PATCH] splitfx: avoid double-truncation with user command Eric Wong

everything related to duct tape audio suite (dtas)

Archives are clonable:
	git clone --mirror https://80x24.org/dtas-all
	git clone --mirror http://ou63pmih66umazou.onion/dtas-all

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.audio.dtas
	nntp://ou63pmih66umazou.onion/inbox.comp.audio.dtas

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git