WavReader class

A class to stream/read audio samples from a WAV file on disk.

Permits seeking and reading audio blocks on-the-fly to keep memory usage low.

Constructors

WavReader(RandomAccessFile file)
Creates a new WavReader instance from file, automatically parsing the header.

Properties

currentSample → int
Gets the current sample frame index location of the reader.
no setter
file → RandomAccessFile
The underlying binary file.
final
format ↔ WavFormat
The WAV format details parsed from the file header.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
info ↔ ListInfo?
Metadata information retrieved from the LIST INFO chunk, if present.
latefinal
isClosed → bool
Returns true if the reader is closed.
no setter
numEndianness ↔ Endian
Endianness format of numeric values in the file.
latefinal
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
storageType ↔ StorageType
The memory storage container type suitable for these samples.
latefinal
totalSamples ↔ int
Total number of audio sample frames per channel.
latefinal

Methods

close() → void
Closes the reader and the underlying file resources.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(int numSamples) → IWavSamplesStorage?
Reads up to numSamples next audio sample frames from the WAV file.
seek(int sampleIndex) → void
Seeks to the specified sampleIndex position frame in the file.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited