mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
Make the definition of buffer length more explicit
This is the standard definition, but apparently it's still confusing. Resolves #47.
This commit is contained in:
@@ -28,7 +28,7 @@ pub struct Buffer<'a> {
|
||||
}
|
||||
|
||||
impl<'a> Buffer<'a> {
|
||||
/// Returns the number of samples in this buffer.
|
||||
/// Returns the number of samples per channel in this buffer.
|
||||
#[inline]
|
||||
pub fn len(&self) -> usize {
|
||||
if self.output_slices.is_empty() {
|
||||
|
||||
@@ -124,7 +124,7 @@ impl ExactSizeIterator for BlocksIter<'_, '_> {}
|
||||
impl ExactSizeIterator for BlockChannelsIter<'_, '_> {}
|
||||
|
||||
impl<'slice, 'sample> Block<'slice, 'sample> {
|
||||
/// Get the number of samples (not channels) in the block.
|
||||
/// Get the number of samples per channel in the block.
|
||||
#[allow(clippy::len_without_is_empty)]
|
||||
#[inline]
|
||||
pub fn len(&self) -> usize {
|
||||
|
||||
Reference in New Issue
Block a user