Skip to content

Commit b95f18e

Browse files
committed
Re-order RMS parameters
1 parent 462afa5 commit b95f18e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/utils/buffers/rms_buffer.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ use super::{RingBuffer, VisualizerBuffer};
55

66
/// Stores RMS amplitudes over time.
77
///
8-
/// This buffer keeps track of the windowed root mean squared amplitude of a signal.
8+
/// This buffer keeps track of the windowed root mean squared amplitudes of a
9+
/// signal.
910
///
1011
/// It needs to be provided a sample rate after initialization - do this inside your
1112
/// [`initialize()`](nih_plug::plugin::Plugin::initialize)` function!
@@ -33,7 +34,12 @@ pub struct RMSBuffer {
3334
}
3435

3536
impl RMSBuffer {
36-
pub fn new(size: usize, rms_duration: f32, duration: f32) -> Self {
37+
/// Creates a new RMSBuffer
38+
///
39+
/// * `size` - The length of the buffer in samples
40+
/// * `duration` - The duration (in seconds) of the RMS data inside the buffer, in seconds
41+
/// * `rms_duration` - The duration of each RMS window, in milliseconds
42+
pub fn new(size: usize, duration: f32, rms_duration: f32) -> Self {
3743
Self {
3844
buffer: RingBuffer::<f32>::new(size),
3945
duration,

0 commit comments

Comments
 (0)