mpeg1audio

package
v1.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2024 License: MIT Imports: 1 Imported by: 11

Documentation

Overview

Package mpeg1audio contains utilities to work with MPEG-1/2 audio codecs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelMode

type ChannelMode int

ChannelMode is a channel mode of a MPEG-1/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/2 audio frame. Specification: ISO 11172-3, 2.4.1.3

func (FrameHeader) FrameLen

func (h FrameHeader) FrameLen() int

FrameLen returns the length of the frame associated with 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL