dts

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package dts decodes DTS Coherent Acoustics core audio (ETSI TS 102 114): the core of a DTS or DTS-HD stream (its extension substreams left aside), up to 5.1 at 48 kHz, in fixed point, as the reference decoder does it.

Index

Constants

View Source
const (
	SpeakerC = iota
	SpeakerL
	SpeakerR
	SpeakerLs
	SpeakerRs
	SpeakerLFE
	SpeakerCs
)

Speakers, as Decoder.Decode gives the channels: the core's primary channels in this order (those present), then the LFE.

Variables

This section is empty.

Functions

func FrameSize

func FrameSize(b []byte) int

FrameSize reads a core frame's size from its first bytes (at least 10), 0 if they are no core frame header.

Types

type Decoder

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

Decoder decodes core frames one after another, keeping the prediction and filter history between them.

func (*Decoder) Decode

func (d *Decoder) Decode(b []byte) (*Frame, error)

Decode decodes one core frame (from its sync word; anything after its size, the extension substreams, is left aside).

type Frame

type Frame struct {
	SampleRate int
	Samples    [7][]int32
}

Frame is a decoded frame: each speaker's 24-bit samples (nil for those absent), at SampleRate.

Jump to

Keyboard shortcuts

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