Class: RiffWaveFormatEx
March 10, 2023 · View on GitHub
node-taglib-sharp / Exports / RiffWaveFormatEx
Class: RiffWaveFormatEx
Defines the format of waveform-audio data. Only format information common to all waveform-audio data formats is included in this structure. https://docs.microsoft.com/en-us/previous-versions/dd757713(v=vs.85)
Implements
Table of contents
Constructors
Properties
Accessors
- audioBitrate
- audioChannels
- audioSampleRate
- averageBytesPerSecond
- bitsPerSample
- blockAlign
- description
- durationMilliseconds
- formatTag
- mediaTypes
Constructors
constructor
• new RiffWaveFormatEx(data)
Constructs and initializes a new instance of a RIFF wave format header from the provided data.
Parameters
| Name | Type | Description |
|---|---|---|
data | ByteVector | Byte vector that contains the raw header |
Properties
CHUNK_FOURCC
▪ Static Readonly CHUNK_FOURCC: "fmt "
FOURCC code that indicates the chunk is a RiffWaveFormatEx object.
WAVE_FORMAT_TAGS
▪ Static Readonly WAVE_FORMAT_TAGS: Map<number, string>
List of well-known wave format tags. This is similar to FOURCC codes but for audio codecs.
Remarks
This list was put together from the Windows 10 SDK mmreg.h header file If any of these descriptions are wrong or out of date, please open a PR.
Accessors
audioBitrate
• get audioBitrate(): number
Bitrate of the audio in kilobits per second represented by the current instance.
Returns
number
Implementation of
ILosslessAudioCodec.audioBitrate
audioChannels
• get audioChannels(): number
Number of channels in the audio represented by the current instance.
Returns
number
Implementation of
ILosslessAudioCodec.audioChannels
audioSampleRate
• get audioSampleRate(): number
Sample rate of the audio represented by the current instance.
Returns
number
Implementation of
ILosslessAudioCodec.audioSampleRate
averageBytesPerSecond
• get averageBytesPerSecond(): number
Gets the average data-transfer rate, in bytes per second, of audio described by the current instance.
Returns
number
bitsPerSample
• get bitsPerSample(): number
Number of bits per sample in the audio represented by the current instance.
Remarks
Some compression schemes cannot define a value for this field, so it may be 0.
This is especially common for MP3 audio embedded in an AVI.
Returns
number
Implementation of
ILosslessAudioCodec.bitsPerSample
blockAlign
• get blockAlign(): number
Gets the block alignment, in bytes. Block alignment is the minimum atomic unit of data for formatTag format type.
Returns
number
description
• get description(): string
Gets a text description of the media represented by the current instance.
Returns
string
Implementation of
ILosslessAudioCodec.description
durationMilliseconds
• get durationMilliseconds(): number
Duration of the media in milliseconds represented by the current instance.
Remarks
Duration cannot be found from this object
Returns
number
Implementation of
ILosslessAudioCodec.durationMilliseconds
formatTag
• get formatTag(): number
Gets the format tag of the audio described by the current instance.
Remarks
Format tags indicate the codec of the audio contained in the file and are contained in a Microsoft registry. For a description of the format, use description. The complete list can be found in the Win32 mmreg.h SDK header file
Returns
number
mediaTypes
• get mediaTypes(): MediaTypes
Types of media represented by the current instance, bitwise combined.
Remarks
Technically any audio format can be encapsulated with a RIFF header since RIFF is simply a "Resource Interchange File Format". It is entirely possible to encapsulate a lossy format (and indeed, lossy WMA must be encapsulated) with a RIFF header. Therefore, this designation as lossless is somewhat misleading and checking description is necessary to verify the codec being used is lossless or not.