Class: LAME::Decoding::DecodedFrame
- Inherits:
-
Object
- Object
- LAME::Decoding::DecodedFrame
- Defined in:
- lib/lame/decoding/decoded_frame.rb
Instance Attribute Summary collapse
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#right ⇒ Object
readonly
Returns the value of attribute right.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(left, right) ⇒ DecodedFrame
constructor
A new instance of DecodedFrame.
- #samples ⇒ Object
Constructor Details
#initialize(left, right) ⇒ DecodedFrame
Returns a new instance of DecodedFrame.
7 8 9 10 |
# File 'lib/lame/decoding/decoded_frame.rb', line 7 def initialize(left, right) @left = left @right = right end |
Instance Attribute Details
#left ⇒ Object (readonly)
Returns the value of attribute left.
5 6 7 |
# File 'lib/lame/decoding/decoded_frame.rb', line 5 def left @left end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
5 6 7 |
# File 'lib/lame/decoding/decoded_frame.rb', line 5 def right @right end |
Class Method Details
.from_short_buffers(left_buffer, right_buffer) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/lame/decoding/decoded_frame.rb', line 12 def self.from_short_buffers(left_buffer, right_buffer) left = left_buffer.read_array_of_short(left_buffer.size/2) right = right_buffer.read_array_of_short(right_buffer.size/2) new(left, right) end |
Instance Method Details
#samples ⇒ Object
19 20 21 |
# File 'lib/lame/decoding/decoded_frame.rb', line 19 def samples left.zip(right) end |