audio-codec 0.4.1

A collection of VoIP audio codecs in pure Rust, including G.711, G.722, G.729, and Opus.
Documentation
[package]
name = "audio-codec"
version = "0.4.1"
edition = "2024"
authors = ["jinti<shenjindi@fourz.cn>"]
description = "A collection of VoIP audio codecs in pure Rust, including G.711, G.722, G.729, and Opus."
license = "MIT"
repository = "https://github.com/restsend/audio-codec"
readme = "README.md"
keywords = ["sip", "voip", "telephony", "webrtc", "no_std"]
categories = ["multimedia", "no-std"]

[features]
default = ["std", "opus"]
# `std` enables the allocating convenience API (`encode`/`decode` returning
# `Vec`, `create_encoder`/`create_decoder` returning `Box`, ...). Without it
# the crate is `#![no_std]`; Opus then needs an `alloc` (its ~250 KB
# encoder/decoder working set is boxed), the other codecs are heap-free.
std = ["g729-sys/std", "opus-rs?/std"]
# Opus support. On by default. opus-rs uses `libm` for transcendentals when
# `std` is off (no_std build).
opus = ["dep:opus-rs", "opus-rs/libm"]

[lib]
crate-type = ["rlib"]

[dependencies]
g729-sys = { version = "0.2", default-features = false }
opus-rs = { version = "0.1.27", optional = true, default-features = false }
libm = { version = "0.2", default-features = false }

[dev-dependencies]
criterion = { version = "0.8.2", features = ["html_reports"] }
opusic-sys = "0.7.3"


[[bench]]
name = "codec_bench"
harness = false