lib/sox/combiner/process_substitution_strategy.rb
def build_converted_input(input_file)
      input    = Sox::File.new(input_file)
      output   = Sox::File.new(SOX_PIPE, :encoding => MEDIATE_ENCODING, :bits => MEDIATE_BITS)
      effects  = {:channels => @options[:channels], :rate => @options[:rate]}
      command  = CommandBuilder.new([input], output, {}, effects).build
      process_substitution_wrap(command)
    end
# Build the shell statement which can be used as the input file with
# the needed rate and number of channels.
#
# @param input_file [String]
#
# @return [String] shell statement which can be used as input file
#
# @example
#   build_converted_input("in.mp3")
#   # => "<(sox in.mp3 --encoding sox --bits 32 -p rate 22100 channels 1)"
Build the shell statement which can be used as the input file with
the needed rate and number of channels.
Build the shell statement which can be used as the input file with the needed rate and number of channels .
def build_converted_input(input_file)
      input    = Sox::File.new(input_file)
      output   = Sox::File.new(SOX_PIPE, :encoding => MEDIATE_ENCODING, :bits => MEDIATE_BITS)
      effects  = {:channels => @options[:channels], :rate => @options[:rate]}
      command  = CommandBuilder.new([input], output, {}, effects).build
      process_substitution_wrap(command)
    end
def build_converted_input ( input_file ) input = Sox :: File . new ( input_file ) output = Sox :: File . new ( SOX_PIPE , :encoding => MEDIATE_ENCODING , :bits => MEDIATE_BITS ) effects = { :channels => @options [ :channels ] , :rate => @options [ :rate ] } command = CommandBuilder . new ( [ input ] , output , { } , effects ) . build process_substitution_wrap ( command ) end
Build the shell statement which can be used as the input file with
the needed rate and number of channels.
Build the shell statement which can be used as the input file with the needed rate and number of channels .
shell statement which can be used as input file
shell statement which can be used as input file
String
input_file
None
example
build_converted_input("in.mp3") # => "<(sox in.mp3 --encoding sox --bits 32 -p rate 22100 channels 1)"
build_converted_input ( " in . mp3 " ) # = > " < ( sox in . mp3 -- encoding sox -- bits 32 - p rate 22100 channels 1 ) "