frame

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package frame implements the FLAC frame wire format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeHeader

func EncodeHeader(w *bits.Writer, header *Header, streamableSubset bool) error

func StartSample

func StartSample(header Header, info streaminfo.StreamInfo) uint64

Types

type Header struct {
	BlockSize         int
	SampleRate        int
	Channels          int
	ChannelAssignment uint8
	BitsPerSample     int
	BlockingStrategy  bool
	Number            uint64
	HeaderBytes       int
	HeaderCRC         byte
	FrameBytes        int
}

func ParseHeader

func ParseHeader(data []byte, info streaminfo.StreamInfo) (Header, error)

type Options

type Options struct {
	Strict bool
	Sync   bool
}

type Scanner

type Scanner struct {
	// contains filtered or unexported fields
}

Scanner splits native FLAC audio data into complete, validated frames.

func NewScanner

func NewScanner(r io.Reader, info streaminfo.StreamInfo, options Options) (*Scanner, error)

func (*Scanner) FrameOffset

func (s *Scanner) FrameOffset() int64

func (*Scanner) Next

func (s *Scanner) Next() ([]byte, Header, error)

Jump to

Keyboard shortcuts

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