Documentation
¶
Overview ¶
Package mpeg2audio contains utilities to work with MPEG-1 and MPEG-2 audio codecs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SplitFrames ¶
SplitFrames splits a sequence of MPEG-1 or MPEG-2 audio frames.
Types ¶
type ChannelMode ¶ added in v0.4.1
type ChannelMode int
ChannelMode is a channel mode of a MPEG-2 or MPEG-2 audio frame.
const ( ChannelModeStereo ChannelMode = 0 ChannelModeJointStereo ChannelMode = 1 ChannelModeDualChannel ChannelMode = 2 ChannelModeMono ChannelMode = 3 )
standard channel modes.
type FrameHeader ¶
type FrameHeader struct { MPEG2 bool Layer uint8 Bitrate int SampleRate int Padding bool ChannelMode ChannelMode }
FrameHeader is the header of a MPEG-1 or MPEG-2 audio frame.
func (FrameHeader) FrameLen ¶
func (h FrameHeader) FrameLen() int
FrameLen returns the length of the frame associated to the header.
func (FrameHeader) SampleCount ¶
func (h FrameHeader) SampleCount() int
SampleCount returns the number of samples contained into the frame.
func (*FrameHeader) Unmarshal ¶
func (h *FrameHeader) Unmarshal(buf []byte) error
Unmarshal decodes a FrameHeader.
Click to show internal directories.
Click to hide internal directories.