node-taglib-sharp / Exports / 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)
- audioBitrate
- audioChannels
- audioSampleRate
- averageBytesPerSecond
- bitsPerSample
- blockAlign
- description
- durationMilliseconds
- formatTag
- mediaTypes
• new RiffWaveFormatEx(data
)
Constructs and initializes a new instance of a RIFF wave format header from the provided data.
Name | Type | Description |
---|---|---|
data |
ByteVector |
Byte vector that contains the raw header |
▪ Static
Readonly
CHUNK_FOURCC: "fmt "
FOURCC code that indicates the chunk is a RiffWaveFormatEx object.
▪ 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.
• get
audioBitrate(): number
Bitrate of the audio in kilobits per second represented by the current instance.
number
ILosslessAudioCodec.audioBitrate
• get
audioChannels(): number
Number of channels in the audio represented by the current instance.
number
ILosslessAudioCodec.audioChannels
• get
audioSampleRate(): number
Sample rate of the audio represented by the current instance.
number
ILosslessAudioCodec.audioSampleRate
• get
averageBytesPerSecond(): number
Gets the average data-transfer rate, in bytes per second, of audio described by the current instance.
number
• 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.
number
ILosslessAudioCodec.bitsPerSample
• get
blockAlign(): number
Gets the block alignment, in bytes. Block alignment is the minimum atomic unit of data for formatTag format type.
number
• get
description(): string
Gets a text description of the media represented by the current instance.
string
ILosslessAudioCodec.description
• get
durationMilliseconds(): number
Duration of the media in milliseconds represented by the current instance.
Remarks
Duration cannot be found from this object
number
ILosslessAudioCodec.durationMilliseconds
• 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
number
• 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.