Class: LAME::Decoder
- Inherits:
-
Object
- Object
- LAME::Decoder
- Extended by:
- Forwardable
- Defined in:
- lib/lame/decoder.rb
Instance Attribute Summary collapse
-
#decode_flags ⇒ Object
readonly
Returns the value of attribute decode_flags.
-
#mp3_data ⇒ Object
readonly
Returns the value of attribute mp3_data.
-
#mp3_file ⇒ Object
readonly
Returns the value of attribute mp3_file.
Instance Method Summary collapse
- #each_decoded_frame ⇒ Object
-
#initialize(mp3_file) ⇒ Decoder
constructor
A new instance of Decoder.
Constructor Details
#initialize(mp3_file) ⇒ Decoder
Returns a new instance of Decoder.
9 10 11 12 13 14 15 |
# File 'lib/lame/decoder.rb', line 9 def initialize(mp3_file) @decode_flags = FFI::DecodeFlags.new @mp3_file = mp3_file skip_id3_tag @mp3_data = parse_mp3_data end |
Instance Attribute Details
#decode_flags ⇒ Object (readonly)
Returns the value of attribute decode_flags.
5 6 7 |
# File 'lib/lame/decoder.rb', line 5 def decode_flags @decode_flags end |
#mp3_data ⇒ Object (readonly)
Returns the value of attribute mp3_data.
5 6 7 |
# File 'lib/lame/decoder.rb', line 5 def mp3_data @mp3_data end |
#mp3_file ⇒ Object (readonly)
Returns the value of attribute mp3_file.
5 6 7 |
# File 'lib/lame/decoder.rb', line 5 def mp3_file @mp3_file end |
Instance Method Details
#each_decoded_frame ⇒ Object
17 18 19 20 21 |
# File 'lib/lame/decoder.rb', line 17 def each_decoded_frame stream_decoder.each_decoded_frame do |decoded_frame| yield decoded_frame end end |