WaveHeader class Null safety

A Wave header.

This class represents the header of a WAVE format audio file, which usually have a .wav suffix. The following integer valued fields are contained:

  • format - usually PCM, ALAW or ULAW.
  • numChannels - 1 for mono, 2 for stereo.
  • sampleRate - usually 8000, 11025, 16000, 22050, or 44100 hz.
  • bitsPerSample - usually 16 for PCM, 8 for ALAW, or 8 for ULAW.
  • numBytes - size of audio data after this header, in bytes.

Constructors

WaveHeader(int mFormat, int mNumChannels, int mSampleRate, int mBitsPerSample, int mNumBytes)
Construct a WaveHeader, with fields initialized. [...]

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
mBitsPerSample int
read / write
mFormat int
read / write
mNumBytes int
read / write
mNumChannels int
read / write
mSampleRate int
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Push a String info of this header
override
write(EventSink<List<int>> out) int
Write a WAVE file header. [...]

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Properties

formatALAW int
Indicates ALAW format.
final
formatPCM int
Indicates PCM format.
final
formatULAW int
Indicates ULAW format.
final
headerLength int
final
tag String
follows WAVE format in http://ccrma.stanford.edu/courses/422/projects/WaveFormat
final

Static Methods

writeId(EventSink<List<int>> out, String id) → void
Push a String to the header
writeInt(EventSink<List<int>> out, int val) → void
Push an int32 in the header
writeint(EventSink<List<int>> out, int val) → void
Push an Int16 in the header