Skip to main content

Module multistream

Module multistream 

Source
Expand description

Opus multistream (surround) — port of the core of src/opus_multistream_{encoder,decoder}.c. Wraps N mono/coupled Opus coders behind a channel-mapping layout so >2-channel audio (quad, 5.1, 7.1) can be coded as a set of standard Opus streams concatenated with the self-delimited framing.

The channel bitrate allocation here is a simple even split across streams (coupled streams get 2x a mono stream’s share) — libopus adds a surround-masking analysis on top, a quality refinement, not a conformance requirement. The bitstream layout, mapping, and per-stream Opus coding are standard, so streams interoperate with libopus.

Structs§

ChannelLayout
OpusMSDecoder
Multistream decoder: decode each stream and remux to the output channels.
OpusMSEncoder
Multistream encoder: one Opus encoder per stream (coupled = stereo, the rest mono), coded per the channel layout and concatenated self-delimited.