Class: LAME::Decoding::SingleFrameDecoder

Inherits:
Object
  • Object
show all
Defined in:
lib/lame/decoding/single_frame_decoder.rb

Instance Method Summary collapse

Constructor Details

#initialize(decode_flags, mp3_data) ⇒ SingleFrameDecoder

Returns a new instance of SingleFrameDecoder.



5
6
7
8
# File 'lib/lame/decoding/single_frame_decoder.rb', line 5

def initialize(decode_flags, mp3_data)
  @decode_flags = decode_flags
  @mp3_data = mp3_data
end

Instance Method Details

#decode(data) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/lame/decoding/single_frame_decoder.rb', line 10

def decode(data)
  flush_buffer do |decoded_frame|
    yield decoded_frame
  end
  decode_data(data) do |decoded_frame|
    yield decoded_frame
  end
end