Fix block length semantics
This commit is contained in:
parent
c3f4e7e2d9
commit
5a005553bc
|
@ -342,9 +342,9 @@ impl<'slice, 'sample> Channels<'slice, 'sample> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'slice, 'sample> Block<'slice, 'sample> {
|
impl<'slice, 'sample> Block<'slice, 'sample> {
|
||||||
/// Get the number of channels in the block.
|
/// Get the number of samples (not channels) in the block.
|
||||||
pub fn len(&self) -> usize {
|
pub fn len(&self) -> usize {
|
||||||
unsafe { (*self.buffers).len() }
|
self.current_block_end - self.current_block_start
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A resetting iterator. This lets you iterate over the same block multiple times. Otherwise
|
/// A resetting iterator. This lets you iterate over the same block multiple times. Otherwise
|
||||||
|
|
Loading…
Reference in a new issue