ac3

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 2 Imported by: 13

Documentation

Overview

Package ac3 contains utilities to work with the AC-3 codec.

Index

Constants

View Source
const (
	// SamplesPerFrame is the number of samples contained inside a frame.
	SamplesPerFrame = 1536
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BSI

type BSI struct {
	Bsid  uint8
	Bsmod uint8
	Acmod uint8
	LfeOn bool
}

BSI is a Bit Stream Information. Specification: ATSC, AC-3, Table 5.2

func (BSI) ChannelCount

func (b BSI) ChannelCount() int

ChannelCount returns the channel count.

func (*BSI) Unmarshal

func (b *BSI) Unmarshal(buf []byte) error

Unmarshal decodes a BSI.

type SyncInfo

type SyncInfo struct {
	Fscod      uint8
	Frmsizecod uint8
}

SyncInfo is a synchronization information. Specification: ATSC, AC-3, Table 5.1

func (SyncInfo) FrameSize

func (s SyncInfo) FrameSize() int

FrameSize returns the frame size.

func (SyncInfo) SampleRate

func (s SyncInfo) SampleRate() int

SampleRate returns the frame sample rate.

func (*SyncInfo) Unmarshal

func (s *SyncInfo) Unmarshal(frame []byte) error

Unmarshal decodes a SyncInfo.

Jump to

Keyboard shortcuts

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