Skip to content

Latest commit

 

History

History
236 lines (128 loc) · 4.95 KB

File metadata and controls

236 lines (128 loc) · 4.95 KB

node-taglib-sharp / Exports / MpegAudioHeader

Class: MpegAudioHeader

Provides information about an MPEG audio stream. For more information and definition of the header, see http://www.mpgedit.org/mpgedit/mpeg_format/mpeghdr.htm

Implements

Table of contents

Accessors

Methods

Accessors

audioBitrate

• get audioBitrate(): number

Bitrate of the audio in kilobits per second represented by the current instance.

Returns

number

Implementation of

IAudioCodec.audioBitrate


audioChannels

• get audioChannels(): number

Number of channels in the audio represented by the current instance.

Returns

number

Implementation of

IAudioCodec.audioChannels


audioSampleRate

• get audioSampleRate(): number

Sample rate of the audio represented by the current instance.

Returns

number

Implementation of

IAudioCodec.audioSampleRate


channelMode

• get channelMode(): MpegAudioChannelMode

Gets the MPEG audio channel mode of the audio represented by the current instance.

Returns

MpegAudioChannelMode


description

• get description(): string

Gets a text description of the media represented by the current instance.

Returns

string

Implementation of

IAudioCodec.description


durationMilliseconds

• get durationMilliseconds(): number

Duration of the media in milliseconds represented by the current instance.

Returns

number

Implementation of

IAudioCodec.durationMilliseconds


isCopyrighted

• get isCopyrighted(): boolean

Whether the current audio is copyrighted.

Returns

boolean


isOriginal

• get isOriginal(): boolean

Whether the current audio is original.

Returns

boolean


isProtected

• get isProtected(): boolean

Gets whether the audio represented by the current instance is protected by CRC.

Returns

boolean


layer

• get layer(): number

Gets the MPEG audio layer used to encode the audio represented by the current instance.

Returns

number


mediaTypes

• get mediaTypes(): MediaTypes

Types of media represented by the current instance, bitwise combined.

Returns

MediaTypes

Implementation of

IAudioCodec.mediaTypes


vbrHeader

• get vbrHeader(): default

Gets the variable bitrate header (VBR) if the MPEG audio frame contains one.

Returns

default


version

• get version(): MpegVersion

Gets the MPEG version used to encode the audio represented by the current instance.

Returns

MpegVersion

Methods

fromFile

▸ Static fromFile(file, searchStart, searchEnd, streamBytes?): MpegAudioHeader

Constructs an MPEG audio header by searching the provided file for an MPEG sync signature and reading the header that immediately follows.

Parameters

Name Type Description
file File File from which to read the audio header
searchStart number Offset into the file to begin searching
searchEnd number Offset into the file to stop searching
streamBytes? number Total number of bytes in the audio stream. Used to calculate duration if a VBR header does not additionally specify it. If VBR header is not present and streamBytes is undefined, then duration will be 0.

Returns

MpegAudioHeader

MpegAudioHeader Header as read from the file, undefined if not found.