surround

command
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: BSD-3-Clause Imports: 4 Imported by: ? 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 main demonstrates multistream (surround) encoding and decoding.

Opus carries more than two channels by splitting the input into several elementary Opus streams (some coupled into stereo pairs, some mono) and describing the layout with a channel-mapping table. gopus exposes this through MultistreamEncoder / MultistreamDecoder.

For the standard Vorbis-style channel orders used by Ogg Opus (1-8 channels: mono, stereo, 3.0, quad, 5.0, 5.1, 6.1, 7.1) the *Default constructors pick the stream count, coupling, and mapping for you. This example encodes and decodes 5.1 surround that way, then prints the resulting stream layout.

Use the explicit NewMultistreamEncoder / NewMultistreamDecoder constructors when you need a custom mapping (for example >8 channels or a non-standard speaker order); see the package docs on those constructors for the mapping table format.

Usage:

go run ./examples/surround

Jump to

Keyboard shortcuts

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