Class: NuWav::FactChunk
Instance Attribute Summary collapse
-
#samples_number ⇒ Object
Returns the value of attribute samples_number.
Attributes inherited from Chunk
Instance Method Summary collapse
Methods inherited from Chunk
#initialize, parse, #read_char, #read_dword, #read_word, #write_char, #write_dword, #write_word
Constructor Details
This class inherits a constructor from NuWav::Chunk
Instance Attribute Details
#samples_number ⇒ Object
Returns the value of attribute samples_number.
131 132 133 |
# File 'lib/nu_wav/chunk.rb', line 131 def samples_number @samples_number end |
Instance Method Details
#parse ⇒ Object
133 134 135 |
# File 'lib/nu_wav/chunk.rb', line 133 def parse @samples_number = read_dword(0) end |
#to_binary(options = {}) ⇒ Object
141 142 143 |
# File 'lib/nu_wav/chunk.rb', line 141 def to_binary(={}) "fact" + write_dword(4) + write_dword(@samples_number) end |
#to_s ⇒ Object
137 138 139 |
# File 'lib/nu_wav/chunk.rb', line 137 def to_s "<chunk type:fact samples_number:#{@samples_number} />" end |