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 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 )