1
0
Fork 0

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:
Robbert van der Helm 2022-12-23 20:34:57 +01:00
parent 78c84b7596
commit 46752fc7f0
2 changed files with 2 additions and 2 deletions

View file

@ -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() {

View file

@ -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 {