Documentation
¶
Index ¶
- Constants
- Variables
- type Header
- func (h Header) Bitrate() int
- func (h Header) BitrateKbps() int
- func (h Header) Compare(other Header) bool
- func (h Header) FrameBytes(freeFormatSize int) int
- func (h Header) FrameSamples() int
- func (h Header) HasPadding() bool
- func (h Header) IsCyclicRedundancyCheck() bool
- func (h Header) IsFrame576() bool
- func (h Header) IsFreeFormat() bool
- func (h Header) IsIntensityStereoEnabled() bool
- func (h Header) IsLayer1() bool
- func (h Header) IsMPEG1() bool
- func (h Header) IsMidSideStereo() bool
- func (h Header) IsMidSideStereoEnabled() bool
- func (h Header) IsMono() bool
- func (h Header) IsNotMPEG25() bool
- func (h Header) IsValid() bool
- func (h Header) Layer() int
- func (h Header) Padding() int
- func (h Header) SampleRate() int
- func (h Header) SampleRateHz() int
- func (h Header) StereoMode() int
- func (h Header) StereoModeExt() int
- func (h Header) UnifiedSampleRateIndex() int
- func (h Header) VersionCode() int
- type VBRIHeader
- type XingHeader
Constants ¶
View Source
const ( MaxChannels = 2 SamplesPerFrameLayer1 = 384 SamplesPerFrameLayer23 = 1152 SamplesPerGranuleLayer3 = 576 SamplesPerSubBandLayer12 = 12 SamplesPerSubBandLayer3 = 18 ChannelModeMono = 3 BytesPerSecMultiplier = 125 ID3v2HeaderSize = 10 )
Variables ¶
View Source
var ErrHeaderTooShort = errors.New("header buffer too short")
Functions ¶
This section is empty.
Types ¶
type Header ¶
type Header [4]byte
func ParseHeader ¶
func (Header) BitrateKbps ¶
func (Header) FrameBytes ¶
func (Header) FrameSamples ¶
func (Header) HasPadding ¶
func (Header) IsCyclicRedundancyCheck ¶
func (Header) IsFrame576 ¶
func (Header) IsFreeFormat ¶
func (Header) IsIntensityStereoEnabled ¶
func (Header) IsMidSideStereo ¶
func (Header) IsMidSideStereoEnabled ¶
func (Header) IsNotMPEG25 ¶
func (Header) SampleRate ¶
func (Header) SampleRateHz ¶
func (Header) StereoMode ¶
func (Header) StereoModeExt ¶
func (Header) UnifiedSampleRateIndex ¶
func (Header) VersionCode ¶
type VBRIHeader ¶
type VBRIHeader struct {
Version uint16
Delay uint16
Quality uint16
Bytes uint32
Frames uint32
TOCEntries uint16
Scale uint32
EntrySize uint16
FramesPerEntry uint16
TOC []uint32 // Accumulated offsets
}
func ParseVBRIHeader ¶
func ParseVBRIHeader(frameData []byte) (*VBRIHeader, error)
Click to show internal directories.
Click to hide internal directories.