#audio #opus #bindings

sys no-std opus-embedded-sys

Bindings to libopus for decoding Opus audio on embedded systems

1 unstable release

new 0.1.0 May 9, 2025

#1822 in Embedded development


Used in opus-embedded

BSD-3-Clause

6MB
70K SLoC

C 51K SLoC // 0.2% comments Python 16K SLoC // 0.3% comments GNU Style Assembly 538 SLoC Shell 532 SLoC // 0.3% comments Automake 418 SLoC // 0.1% comments Jupyter Notebooks 318 SLoC // 0.0% comments Perl 264 SLoC // 0.2% comments M4 199 SLoC // 0.3% comments Rust 170 SLoC // 0.2% comments Batch 14 SLoC // 0.1% comments

Contains (obscure autoconf code, 41KB) src/opus/configure.ac

libopus bindings for decoding

This is libopus bindings for decoding Opus. The build links libopus statically and is no-std 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 OpusDecoder size differs. Please file issue tickets when you see size mismatches.

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 makes OpusDecoder struct to take more space so that decoders for stereo streams can be initialized. Not enabled by default.

Abstractions over this crate should disable default features and include their own respective features that enable these features case by case.

License

This crate is BSD licensed just like libopus. See COPYING and COPYING.libopus for more infomation. Dependency crates have their own licenses.

No runtime deps