WaveHeader class

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.
no setterinherited
mBitsPerSample ↔ int
getter/setter pair
mFormat ↔ int
getter/setter pair
mNumBytes ↔ int
getter/setter pair
mNumChannels ↔ int
getter/setter pair
mSampleRate ↔ int
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent 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