class NuWav::MextChunk

Attributes

ancillary_data_def[RW]
ancillary_data_length[RW]
frame_size[RW]
reserved[RW]
sound_information[RW]

Public Instance Methods

parse() click to toggle source
# File lib/nu_wav/chunk.rb, line 150
def parse
  @sound_information =      read_word(0)
  @frame_size =             read_word(2)
  @ancillary_data_length =  read_word(4)
  @ancillary_data_def =     read_word(6)
  @reserved =               read_char(8,4)
end
to_binary(options={}) click to toggle source
# File lib/nu_wav/chunk.rb, line 162
def to_binary(options={})
  out = "mext" + write_dword(12)
  out += write_word(@sound_information)
  out += write_word(@frame_size)
  out += write_word(@ancillary_data_length)
  out += write_word(@ancillary_data_def)
  out += write_char(@reserved, 4)
  out
end
to_s() click to toggle source
# File lib/nu_wav/chunk.rb, line 158
def to_s
  "<chunk type:mext sound_information:(#{sound_information}) #{(0..15).inject(''){|s,x| "#{s}#{sound_information[x]}"}}, frame_size:#{frame_size}, ancillary_data_length:#{ancillary_data_length}, ancillary_data_def:#{(0..15).inject(''){|s,x| "#{s}#{ancillary_data_def[x]}"}}, reserved:'#{reserved}' />"
end