rabu

Crates.iorabu
lib.rsrabu
version0.3.1
sourcesrc
created_at2022-12-18 12:28:42.998877
updated_at2022-12-20 21:45:45.250014
descriptionRust Audio Basic Utilies
homepagehttps://github.com/w-ensink/rabu
repositoryhttps://github.com/w-ensink/rabu
max_upload_size
id740369
size42,114
Wouter Ensink (w-ensink)

documentation

README

Rust Audio Basic Utilities (rabu)

Some basic audio utilities and processors. These tools are meant to be simple and easy to use, while also expressing as much intend as possible.

The complete docs can be found at docs.rs.


Examples

Strongly typed units can easily be converted into each other:

use rabu::units::{SampleRate, Samples, Seconds};

let seconds = Seconds::from(3.0);
let sample_rate = SampleRate::from(44100);

let samples = seconds.to_samples(sample_rate);

assert_eq!(samples, Samples::from(132_300));

Audio buffers can be used in a way that makes sense:

use rabu::buffer::Buffer;
use rabu::units::{Channels, Samples};

let mut buffer = Buffer::allocate(Channels::from(2), Samples::from(4));

for channel in buffer.iter_chans_mut() {
    for sample in channel.iter_mut() {
        *sample = 1.0;
    }
}
Commit count: 40

cargo fmt