class NuWav::BextChunk

Attributes

coding_history[RW]
description[RW]
origination_date[RW]
origination_time[RW]
originator[RW]
originator_reference[RW]
reserved[RW]
time_reference_high[RW]
time_reference_low[RW]
umid[RW]
version[RW]

Public Instance Methods

parse() click to toggle source
# 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={}) click to toggle source
# File lib/nu_wav/chunk.rb, line 195
def to_binary(options={})
  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() click to toggle source
# 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