Class: Ogg::Vorbis::HeaderPacket
Overview
This class forms a basis for other Vorbis header packets. See www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-610004.2.1
Direct Known Subclasses
Instance Attribute Summary collapse
-
#packet_type ⇒ Object
readonly
Returns the value of attribute packet_type.
Attributes inherited from Packet
Instance Method Summary collapse
-
#initialize(page) ⇒ HeaderPacket
constructor
A new instance of HeaderPacket.
Methods inherited from Packet
Constructor Details
#initialize(page) ⇒ HeaderPacket
Returns a new instance of HeaderPacket.
171 172 173 174 175 176 177 178 179 |
# File 'lib/ogginfo-rb.rb', line 171 def initialize page super @packet_type = @data.read(1).unpack('C').first vorbis_check = @data.read(6) unless vorbis_check == 'vorbis' $stderr.puts "Warning: 'vorbis' string not found in header" end end |
Instance Attribute Details
#packet_type ⇒ Object (readonly)
Returns the value of attribute packet_type.
169 170 171 |
# File 'lib/ogginfo-rb.rb', line 169 def packet_type @packet_type end |