Class: RubberBand::Options

Inherits:
Hash
  • Object
show all
Defined in:
lib/rubberband/options.rb

Constant Summary collapse

BINARY_OPTIONS =
%w{formant precise realtime no_threads threads 
no_transients bl_transients no_lamination 
window_long window_short detector_perc 
detector_soft pitch_hq}

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Options

Returns a new instance of Options.



8
9
10
# File 'lib/rubberband/options.rb', line 8

def initialize(options={})
  merge!(options)
end

Instance Method Details

#to_sObject



12
13
14
15
16
17
18
19
20
# File 'lib/rubberband/options.rb', line 12

def to_s
  params = collect do |key, value|
    send("convert_#{key}", value) if value && supports_option?(key)
  end

  params_string = params.join(" ")
  params_string << " -q"
  params_string
end