types

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: BSD-3-Clause Imports: 0 Imported by: 1 module, 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 types defines the Mode, Bandwidth, and Signal values shared by gopus packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bandwidth

type Bandwidth uint8

Bandwidth is the nominal audio bandwidth coded in an Opus frame.

const (
	BandwidthNarrowband    Bandwidth = iota // 4 kHz audio, 8 kHz sample rate (OPUS_BANDWIDTH_NARROWBAND).
	BandwidthMediumband                     // 6 kHz audio, 12 kHz sample rate (OPUS_BANDWIDTH_MEDIUMBAND).
	BandwidthWideband                       // 8 kHz audio, 16 kHz sample rate (OPUS_BANDWIDTH_WIDEBAND).
	BandwidthSuperwideband                  // 12 kHz audio, 24 kHz sample rate (OPUS_BANDWIDTH_SUPERWIDEBAND).
	BandwidthFullband                       // 20 kHz audio, 48 kHz sample rate (OPUS_BANDWIDTH_FULLBAND).
)

type Mode

type Mode uint8

Mode is the Opus coding mode for a frame: SILK, Hybrid, or CELT.

const (
	ModeSILK   Mode = iota // SILK-only mode (TOC configs 0-11, libopus MODE_SILK_ONLY).
	ModeHybrid             // Hybrid SILK+CELT mode (TOC configs 12-15, libopus MODE_HYBRID).
	ModeCELT               // CELT-only mode (TOC configs 16-31, libopus MODE_CELT_ONLY).
)

type Signal

type Signal int

Signal is an encoder hint that identifies input as automatic, voice, or music. It biases mode selection but does not force a coding mode.

const (
	// SignalAuto lets the encoder detect the signal type automatically
	// (libopus OPUS_AUTO).
	SignalAuto Signal = -1000
	// SignalVoice hints that the input is speech, biasing toward SILK mode
	// (libopus OPUS_SIGNAL_VOICE).
	SignalVoice Signal = 3001
	// SignalMusic hints that the input is music, biasing toward CELT mode
	// (libopus OPUS_SIGNAL_MUSIC).
	SignalMusic Signal = 3002
)

Jump to

Keyboard shortcuts

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