def concat(options={})
      output_format = options[:output_format] ? options[:output_format] : "wav"
      dst = Tempfile.new(["out", ".#{output_format}"])
      files = get_array(@file)
      begin
        parameters = files.dup
        parameters << ":dest"
        parameters = parameters.flatten.compact.join(" ").strip.squeeze(" ")
        success = Cocaine::CommandLine.new("sox", parameters).run(:dest => get_path(dst))
      rescue => e
        raise AudioHeroError, "There was an error joining #{@file}"
      end
      # no garbage collect option for join
      dst
    end
def concat(options={})
      output_format = options[:output_format] ? options[:output_format] : "wav"
      dst = Tempfile.new(["out", ".#{output_format}"])
      files = get_array(@file)
      begin
        parameters = files.dup
        parameters << ":dest"
        parameters = parameters.flatten.compact.join(" ").strip.squeeze(" ")
        success = Cocaine::CommandLine.new("sox", parameters).run(:dest => get_path(dst))
      rescue => e
        raise AudioHeroError, "There was an error joining #{@file}"
      end
      # no garbage collect option for join
      dst
    end
Concat takes in an array of audio files (same format) and concatenate them.