opus-embedded

Crates.ioopus-embedded
lib.rsopus-embedded
version0.1.1
created_at2025-05-09 10:00:27.004001+00
updated_at2025-05-19 12:28:26.108142+00
descriptionDecoding of Opus audio without allocation
homepage
repositoryhttps://github.com/Tomin1/oggopus-embedded
max_upload_size
id1666855
size34,861
Tomi Leppänen (Tomin1)

documentation

README

Opus decoder

This is safe abstractions over libopus for decoding Opus audio. The build links libopus statically and is no_std and no_alloc on targets without std library.

The build for ARM has flags set for Cortex-M0+. Other microcontrollers could be supported better with some work.

Note that the code might not work on some platforms if Decoder size differs. Please file issue tickets when you see size mismatches.

Crates.io BSD-3-Clause licensed

Features

This crate has some features that can be enabled or disabled as needed.

  • optimize_libopus enables optimizing libopus build even in debug builds. This is important for performance and is enabled by default.
  • stereo enables constructing Decoder for stereo streams. This increases Decoder struct size by about 50 %. Not enabled by default.

Note that the optimizations are not applied to any Rust code, only the underlying C-written libopus library which would perform very poorly without any optimization. This feature allows to disable those optimizations.

Stereo decoding is not always desired in embedded systems. Enable it if you are decoding streams that may contain more than one channel of audio (per stream).

License

This crate is BSD licensed. See COPYING for more information. Dependency crates have their own licenses.

Commit count: 74

cargo fmt