Class: WaveFile::ChunkReaders::RiffReader
- Inherits:
-
Object
- Object
- WaveFile::ChunkReaders::RiffReader
- Defined in:
- lib/wavefile/chunk_readers/header_reader.rb
Overview
Used to read the RIFF chunks in a wave file up until the data chunk. Thus is 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.
Defined Under Namespace
Classes: BaseChunkReader, DataChunkReader, FormatChunkReader, GenericChunkReader, RiffChunkReader
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.
Instance Method Summary collapse
-
#initialize(file, file_name) ⇒ RiffReader
constructor
:nodoc:.
Constructor Details
#initialize(file, file_name) ⇒ RiffReader
:nodoc:
7 8 9 10 11 12 |
# File 'lib/wavefile/chunk_readers/header_reader.rb', line 7 def initialize(file, file_name) @file = file @file_name = file_name read_until_data_chunk end |
Instance Attribute Details
#data_chunk_reader ⇒ Object (readonly)
Returns the value of attribute data_chunk_reader.
14 15 16 |
# File 'lib/wavefile/chunk_readers/header_reader.rb', line 14 def data_chunk_reader @data_chunk_reader end |
#native_format ⇒ Object (readonly)
Returns the value of attribute native_format.
14 15 16 |
# File 'lib/wavefile/chunk_readers/header_reader.rb', line 14 def native_format @native_format end |