cpal
Cross-platform audio I/O library in pure Rust (by RustAudio)
rodio
Rust audio playback library (by RustAudio)
Our great sponsors
cpal | rodio | |
---|---|---|
11 | 9 | |
2,411 | 1,585 | |
3.2% | 2.8% | |
7.8 | 6.9 | |
27 days ago | 2 days ago | |
Rust | Rust | |
Apache License 2.0 | Apache License 2.0 |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
cpal
Posts with mentions or reviews of cpal.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-05-28.
-
What's everyone working on this week (22/2023)?
debugging this nightmare bc its blocking my hobby project. by far the most fucked up issue ive encountered since i started rust.
- Nannou – An open-source creative-coding framework for Rust
-
Creating an Audio File Player from scratch
There is a cross-platform audio library for Rust: cpal https://github.com/rustaudio/cpal
-
Read the voice from the microphone for accessibility
cpal crate should work fine for this use case, though it might be unnecessarily low-level for your use case.
-
Modify pitch and volume while a sound file is playing
I had to do something similar to this a while back. I used cpal.
- RustAudio/cpal: Cross-platform audio I/O library in pure Rust
-
What’s everyone working on this week (including AoC, 51/2021)?
Working on a live performance software that would let our band have live real-time practices over the internet. Top priority is minimum latency, so I'm trying to hook it up through ASIO. Not much luck yet. I've tried cpal, but I've run into numerous known random bugs (and some versions don't compile for me). At least I confirmed that I can push the audio through a TCP socket successfully.
-
How to read out decibels from default audio input device?
With https://github.com/RustAudio/cpal you can access the microphone in a cross platform way, but you’ll get values of range [-1,1] out only. To calculate absolute decibels you would need to calibrate for your specific microphone with a known source.
-
How can I visualize currently playing audio in Linux?
source of example
-
Hey Rustaceans! Got an easy question? Ask here (7/2021)!
you need to use a "loopback" device, as shown here - https://github.com/RustAudio/cpal/pull/478 (note, ive only tested this on windows - if its not supported on linux you could always plug your sound card output into its line-in/mic jack)
rodio
Posts with mentions or reviews of rodio.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-03-24.
-
Yew + Tauri WASM Desktop App - Methods of Local Filesystem Access
I'm currently working on creating a desktop app with web UI using Yew (wasm32-unknown-unknown), and Tauri for the desktop packaging side of things. In this particular case, I'd like to be able to play audio files from the user's local filesystem using the rodio crate, and also to process text files for purposes such as configuration, for example by using the csv crate. I know for absolute certain that the app will only be run in a desktop context, i.e, Windows, Linux and MacOS, and therefore will always have a filesystem physically existent despite any WASM sandboxing (which I'm aware of, hence asking for any possible methods).
I'm currently working on creating a desktop app with web UI using Yew, and Tauri for the desktop packaging side of things. In this particular case, I'd like to be able to play audio files from the user's local filesystem using the rodio crate, and also to process text files for purposes such as configuration, for example by using the csv. I know for absolute certain that the app will only be run in a desktop context, i.e, Window, Linux and MacOS, and therefore will always have a filesystem physically existent despite any WASM sandboxing (which I'm aware of, hence asking for any possible methods).
-
An alternative to FFmpeg?
There's symphonia for audio, although it's quite low-level. rodio is a better choice if you just want to play some sounds.
-
Introducing the Music Player: A High-Performance, Extensible Application for Digital Audio Playback
The Music Player is based on Rodio, which is a high-performance audio playback library for Rust, and Symphonia, which is a Rust library for working with music metadata and audio decoding. This allows the Music Player to provide high-quality audio playback and management.
-
What is the simplest way to play an audio sample, across platforms, including web?
https://crates.io/crates/rodio Its based on cpal and has basic necessities like resampler.
-
Dungeoncrawler audio
I believe rodio is generally regarded as a good spot to start for audio in Rust. Open Game Art has a fair few tilesets, you could take a look there.
-
Modify pitch and volume while a sound file is playing
I have tried the https://crates.io/crates/rodio crate already but I did not find a way to change the parameters while the background thread is playing the song.
-
Streaming Youtube Audio/Video with Rust
I changed into mp3 cuz I didn't know how to use rodio to play other file format like m4a, because it needed symphonia and I could'nt find any example of symphonia on the internet.
-
Symphonia v0.3: pure-Rust decoders for MP3, WAV, FLAC, AAC
Also, you can now use Symphonia as a backend in rodio.
What are some alternatives?
When comparing cpal and rodio you can also consider the following projects:
swyh-rs - Stream What You Hear written in rust, inspired by SWYH.
Symphonia - Pure Rust multimedia format demuxing, tag reading, and audio decoding library
rubato - An asyncronous resampling library written in Rust
rust-portaudio - PortAudio bindings and wrappers for Rust.
openal-rs
rust-fmod - A rust binding for the FMOD library
rust-vst2 - VST 2.4 API implementation in rust. Create plugins or hosts.
sudo.rs
rust-cookbook - https://rust-lang-nursery.github.io/rust-cookbook
hound - A wav encoding and decoding library in Rust