From 2907cc6dd0b0d2d80d44ae292a157651d6e05ee7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 26 Aug 2013 05:25:22 +0000 Subject: player: flesh out multi-source in protocol/sourceedit We should be fully-capable of managing any number of options to try sources in. --- lib/dtas/source/sox.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/dtas/source/sox.rb') diff --git a/lib/dtas/source/sox.rb b/lib/dtas/source/sox.rb index fa6192d..e1baee9 100644 --- a/lib/dtas/source/sox.rb +++ b/lib/dtas/source/sox.rb @@ -13,6 +13,7 @@ class DTAS::Source::Sox # :nodoc: SOX_DEFAULTS = COMMAND_DEFAULTS.merge( "command" => 'exec sox "$INFILE" $SOXFMT - $TRIMFX $RGFX', + "tryorder" => 0, ) def initialize @@ -23,9 +24,7 @@ class DTAS::Source::Sox # :nodoc: err = "" qx(@env, %W(soxi #{infile}), err_str: err, no_raise: true) return if err =~ /soxi FAIL formats:/ - rv = dup - rv.source_file_init(infile, offset) - rv + source_file_dup(infile, offset) end def precision @@ -100,4 +99,8 @@ class DTAS::Source::Sox # :nodoc: def to_hsh to_hash.delete_if { |k,v| v == SOX_DEFAULTS[k] } end + + def source_defaults + SOX_DEFAULTS + end end -- cgit v1.2.3-24-ge0c7