28 releases (12 breaking)
Uses old Rust 2015
new 0.17.1 | Nov 15, 2024 |
---|---|
0.16.0 | Oct 31, 2024 |
0.13.0 | May 13, 2024 |
0.12.0 | Jan 16, 2024 |
0.5.1 | Mar 23, 2018 |
#846 in Audio
3,246 downloads per month
Used in 4 crates
(via cubeb-core)
400KB
974 lines
cubeb-rs
A cross-platform audio library in Rust.
Features
Provides access to the following:
- Multiple audio backends across multiple platforms. See here for details.
- Enumeration of available audio devices.
- Opening input, output and duplex audio streams with control over latency, sample rate, channel layout, state transitions, data handling and more.
Goals
Currently, cubeb-rs is based on a set of bindings to the original cubeb C++ library most notable for its use as the audio backend within Gecko, Mozilla's browser engine. The long-term goal for cubeb-rs is to become independent of the C++ library and provide a pure-Rust implementation down to the level of the platform API eventually replacing the original within Gecko where possible.
In order to achieve this goal cubeb-rs is structured in a manner that supports backend implementations in both pure-Rust and via bindings to the C++ implementation, allowing for progressive replacement. So far, pure-Rust implementations exist for:
- CoreAudio https://github.com/mozilla/cubeb-coreaudio-rs
- PulseAudio https://github.com/mozilla/cubeb-pulse-rs
The plan is to consolidate all cubeb-related projects (including backend implementations) under a single repository here in the near future.
While cubeb is primarily renown for its use within Gecko, contributions and use from projects outside of Gecko is very welcome.
Crates
The following crates are included within this repository: