File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff 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
3536impl 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,
You can’t perform that action at this time.
0 commit comments