| Crates.io | rms |
| lib.rs | rms |
| version | 0.4.2 |
| created_at | 2015-03-27 06:06:42.788393+00 |
| updated_at | 2015-12-12 23:55:19.918092+00 |
| description | A simple type for calculating and storing the RMS given some buffer of interleaved audio samples. |
| homepage | https://github.com/RustAudio/rms |
| repository | https://github.com/RustAudio/rms.git |
| max_upload_size | |
| id | 1722 |
| size | 13,377 |
A simple type for calculating and storing the RMS given some buffer of interleaved audio samples.
const WINDOW_SIZE_MS: f64 = 10.0;
let mut rms = Rms::new(WINDOW_SIZE_MS);
rms.udpate(&sample_buffer[..], dsp_settings);
println!("Average RMS across channels at the last frame: {:?}", rms.avg_at_last_frame());
println!("RMS for each channel at the last frame: {:?}", rms.per_channel_at_last_frame());
The Rms type also implements dsp-chain's Dsp trait, meaning it can be updated as a node within a DspGraph.
Add the rms crate to your dependencies like so:
[dependencies]
rms = "<version>"