Click or drag to resize

AudioFrameHeader Class

Encapsulates audio information. Borrowed from the codeproject article MPEG Audio Frame Header. This class is not an original part of the NTagLite project source.
Inheritance Hierarchy
SystemObject
  Orthogonal.NTagLiteAudioFrameHeader

Namespace: Orthogonal.NTagLite
Assembly: Orthogonal.NTagLite (in Orthogonal.NTagLite.dll) Version: 3.0.4
Syntax
C#
public class AudioFrameHeader

The AudioFrameHeader type exposes the following members.

Constructors
 NameDescription
Public methodAudioFrameHeader construct MP3FrameHeader from 4 supplied bytes
Top
Properties
 NameDescription
Public propertyBitRate bitrate for this frame 0 for "free", i.e. free format. The free bitrate must remain constant, and must be lower than the maximum allowed bitrate. VBR encoders usually select a different one of the standard bitrates for each frame.
Public propertyChannelMode stereo mode; different for every frame
Public propertyChecksumSize checksum size Protection = 0 - Protected by CRC (16bit crc follows header), 1 - Not protected
Public propertyCopyright 
Public propertyCRCs 
Public propertyDebugString some text to show we decoded it correctly
Public propertyEmphasis emphasis; different for every frame
Public propertyFrameLengthInBytes length of this frame in bytes; different for every frame bitrate calculation includes the standard header bytes of normal audio frames already returns null for 'free' bitrate files because parsing the audio coefficients to work out how long it should be is too much work. If you want to know how long the frame is, ask the audio stream, not the header.
Public propertyHeaderSize size of standard header NB not all these bytes will have been read in
Public propertyIdealisedFrameLengthInBytes 'ideal' length of a frame at this bitrate; returns double, disregards padding. returns null for 'free' bitrate files because parsing the audio coefficients to work out how long it should be is too much work. If you want to know how long the frame should be, ask the audio stream, not the header.
Public propertyIsFreeBitRate is it a "free" bitrate file?
Public propertyIsMono mono; must be same for every frame
Public propertyLayer mpeg layer
Public propertyOriginal 
Public propertyPaddingSize padding size; different for every frame
Public propertyPrivate 
Public propertySamplesPerFrame samples per frame; same for every frame
Public propertySamplesPerSecond samples per second; same for every frame
Public propertySecondsPerFrame seconds per frame; same for every frame e.g. 384 Samples/Frame / 44100 Samples/Second = 8.7mS each
Public propertySideInfoSize channel config block size; different for every frame
Public propertyValid Simple validity check to verify all header fields are in legal ranges
Public propertyVersionLayer mpeg version and layer
Top
Fields
 NameDescription
Protected field_headerBuffer byte array containing at least 4 bytes of raw frame data
Top
See Also