Documentation
¶
Overview ¶
Package opus provides a Opus Audio Codec RFC 6716 implementation
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bandwidth ¶
type Bandwidth byte
The Bandwidth the Opus codec scales from 6 kbit/s narrowband mono speech to 510 kbit/s fullband stereo music, with algorithmic delays ranging from 5 ms to 65.2 ms. At any given time, either the LP layer, the MDCT layer, or both, may be active. It can seamlessly switch between all of its various operating modes, giving it a great deal of flexibility to adapt to varying content and network conditions without renegotiating the current session. The codec allows input and output of various audio bandwidths, defined as follows: +----------------------+-----------------+-------------------------+ | Abbreviation | Audio Bandwidth | Sample Rate (Effective) | +----------------------+-----------------+-------------------------+ | NB (narrowband) | 4 kHz | 8 kHz | | | | | | MB (medium-band) | 6 kHz | 12 kHz | | | | | | WB (wideband) | 8 kHz | 16 kHz | | | | | | SWB (super-wideband) | 12 kHz | 24 kHz | | | | | | FB (fullband) | 20 kHz (*) | 48 kHz | +----------------------+-----------------+-------------------------+
https://datatracker.ietf.org/doc/html/rfc6716#section-2
const ( BandwidthNarrowband Bandwidth = iota + 1 BandwidthMediumband BandwidthWideband BandwidthSuperwideband BandwidthFullband )
Bandwidth constants.
func (Bandwidth) SampleRate ¶
SampleRate returns the effective SampleRate for a given bandwidth.
type Configuration ¶
type Configuration byte
Configuration numbers in each range (e.g., 0...3 for NB SILK- only) correspond to the various choices of frame size, in the same order. For example, configuration 0 has a 10 ms frame size and configuration 3 has a 60 ms frame size. +-----------------------+-----------+-----------+-------------------+ | Configuration | Mode | Bandwidth | Frame Sizes | | Number(s) | | | | +-----------------------+-----------+-----------+-------------------+ | 0...3 | SILK-only | NB | 10, 20, 40, 60 ms | | | | | | | 4...7 | SILK-only | MB | 10, 20, 40, 60 ms | | | | | | | 8...11 | SILK-only | WB | 10, 20, 40, 60 ms | | | | | | | 12...13 | Hybrid | SWB | 10, 20 ms | | | | | | | 14...15 | Hybrid | FB | 10, 20 ms | | | | | | | 16...19 | CELT-only | NB | 2.5, 5, 10, 20 ms | | | | | | | 20...23 | CELT-only | WB | 2.5, 5, 10, 20 ms | | | | | | | 24...27 | CELT-only | SWB | 2.5, 5, 10, 20 ms | | | | | | | 28...31 | CELT-only | FB | 2.5, 5, 10, 20 ms | +-----------------------+-----------+-----------+-------------------+
Directories
¶
Path | Synopsis |
---|---|
examples
|
|
decode
Package main is an example of an Opus decoder that save the output PCM to disk
|
Package main is an example of an Opus decoder that save the output PCM to disk |
playback
Module
|
|
internal
|
|
bitdepth
Package bitdepth provides utilities to convert between different audio bitdepths
|
Package bitdepth provides utilities to convert between different audio bitdepths |
rangecoding
Package rangecoding provides a Range coder for the Opus bitstream
|
Package rangecoding provides a Range coder for the Opus bitstream |
resample
Package resample provides tools to resample audio
|
Package resample provides tools to resample audio |
silk
Package silk provides a Silk coder
|
Package silk provides a Silk coder |
pkg
|
|
oggreader
Package oggreader implements the Ogg media container reader
|
Package oggreader implements the Ogg media container reader |