Class: WaveFile::ChunkReaders::RiffReader
- Inherits:
-
Object
- Object
- WaveFile::ChunkReaders::RiffReader
- Defined in:
- lib/wavefile/chunk_readers/riff_reader.rb
Overview
Internal: Used to read the RIFF chunks in a wave file up until the data chunk. Thus it can be used to open a wave file and “queue it up” to the start of the actual sample data, as well as extract information out of pre-data chunks, such as the format chunk.
Instance Attribute Summary collapse
-
#data_chunk_reader ⇒ Object
readonly
Returns the value of attribute data_chunk_reader.
-
#native_format ⇒ Object
readonly
Returns the value of attribute native_format.
-
#sample_chunk ⇒ Object
readonly
Returns the value of attribute sample_chunk.
Instance Method Summary collapse
-
#initialize(io, format = nil) ⇒ RiffReader
constructor
:nodoc:.
Constructor Details
#initialize(io, format = nil) ⇒ RiffReader
:nodoc:
7 8 9 10 11 |
# File 'lib/wavefile/chunk_readers/riff_reader.rb', line 7 def initialize(io, format=nil) @io = io read_until_data_chunk(format) end |
Instance Attribute Details
#data_chunk_reader ⇒ Object (readonly)
Returns the value of attribute data_chunk_reader.
13 14 15 |
# File 'lib/wavefile/chunk_readers/riff_reader.rb', line 13 def data_chunk_reader @data_chunk_reader end |
#native_format ⇒ Object (readonly)
Returns the value of attribute native_format.
13 14 15 |
# File 'lib/wavefile/chunk_readers/riff_reader.rb', line 13 def native_format @native_format end |
#sample_chunk ⇒ Object (readonly)
Returns the value of attribute sample_chunk.
13 14 15 |
# File 'lib/wavefile/chunk_readers/riff_reader.rb', line 13 def sample_chunk @sample_chunk end |