Class: NuWav::BextChunk
Instance Attribute Summary collapse
-
#coding_history ⇒ Object
Returns the value of attribute coding_history.
-
#description ⇒ Object
Returns the value of attribute description.
-
#origination_date ⇒ Object
Returns the value of attribute origination_date.
-
#origination_time ⇒ Object
Returns the value of attribute origination_time.
-
#originator ⇒ Object
Returns the value of attribute originator.
-
#originator_reference ⇒ Object
Returns the value of attribute originator_reference.
-
#reserved ⇒ Object
Returns the value of attribute reserved.
-
#time_reference_high ⇒ Object
Returns the value of attribute time_reference_high.
-
#time_reference_low ⇒ Object
Returns the value of attribute time_reference_low.
-
#umid ⇒ Object
Returns the value of attribute umid.
-
#version ⇒ Object
Returns the value of attribute version.
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
#coding_history ⇒ Object
Returns the value of attribute coding_history.
174 175 176 |
# File 'lib/nu_wav/chunk.rb', line 174 def coding_history @coding_history end |
#description ⇒ Object
Returns the value of attribute description.
174 175 176 |
# File 'lib/nu_wav/chunk.rb', line 174 def description @description end |
#origination_date ⇒ Object
Returns the value of attribute origination_date.
174 175 176 |
# File 'lib/nu_wav/chunk.rb', line 174 def origination_date @origination_date end |
#origination_time ⇒ Object
Returns the value of attribute origination_time.
174 175 176 |
# File 'lib/nu_wav/chunk.rb', line 174 def origination_time @origination_time end |
#originator ⇒ Object
Returns the value of attribute originator.
174 175 176 |
# File 'lib/nu_wav/chunk.rb', line 174 def originator @originator end |
#originator_reference ⇒ Object
Returns the value of attribute originator_reference.
174 175 176 |
# File 'lib/nu_wav/chunk.rb', line 174 def originator_reference @originator_reference end |
#reserved ⇒ Object
Returns the value of attribute reserved.
174 175 176 |
# File 'lib/nu_wav/chunk.rb', line 174 def reserved @reserved end |
#time_reference_high ⇒ Object
Returns the value of attribute time_reference_high.
174 175 176 |
# File 'lib/nu_wav/chunk.rb', line 174 def time_reference_high @time_reference_high end |
#time_reference_low ⇒ Object
Returns the value of attribute time_reference_low.
174 175 176 |
# File 'lib/nu_wav/chunk.rb', line 174 def time_reference_low @time_reference_low end |
#umid ⇒ Object
Returns the value of attribute umid.
174 175 176 |
# File 'lib/nu_wav/chunk.rb', line 174 def umid @umid end |
#version ⇒ Object
Returns the value of attribute version.
174 175 176 |
# File 'lib/nu_wav/chunk.rb', line 174 def version @version end |
Instance Method Details
#parse ⇒ Object
177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/nu_wav/chunk.rb', line 177 def parse @description = read_char(0,256) @originator = read_char(256,32) @originator_reference = read_char(288,32) @origination_date = read_char(320,10) @origination_time = read_char(330,8) @time_reference_low = read_dword(338) @time_reference_high = read_dword(342) @version = read_word(346) @umid = read_char(348,64) @reserved = read_char(412,190) @coding_history = read_char(602) end |
#to_binary(options = {}) ⇒ Object
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/nu_wav/chunk.rb', line 195 def to_binary(={}) out = "bext" + write_dword(602 + @coding_history.length ) out += write_char(@description, 256) out += write_char(@originator, 32) out += write_char(@originator_reference, 32) out += write_char(@origination_date, 10) out += write_char(@origination_time, 8) out += write_dword(@time_reference_low) out += write_dword(@time_reference_high) out += write_word(@version) out += write_char(@umid, 64) out += write_char(@reserved, 190) out += write_char(@coding_history) # make sure coding history ends in '\r\n' out end |
#to_s ⇒ Object
191 192 193 |
# File 'lib/nu_wav/chunk.rb', line 191 def to_s "<chunk type:bext description:'#{description}', originator:'#{originator}', originator_reference:'#{originator_reference}', origination_date:'#{origination_date}', origination_time:'#{origination_time}', time_reference_low:#{time_reference_low}, time_reference_high:#{time_reference_high}, version:#{version}, umid:#{umid}, reserved:'#{reserved}', coding_history:#{coding_history} />" end |