Skip to content

Commit

Permalink
test: make them pass
Browse files Browse the repository at this point in the history
  • Loading branch information
SolarLiner committed Sep 13, 2024
1 parent 0b2ad2b commit f8e81ca
Show file tree
Hide file tree
Showing 2 changed files with 4,103 additions and 4,103 deletions.
12 changes: 6 additions & 6 deletions crates/valib-core/src/dsp/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ impl<T, const LENGTH: usize, const CHANNELS: usize> AudioBuffer<[T; LENGTH], CHA
/// # Examples
///
/// ```
/// use valib_core::dsp::buffer::AudioBufferBox;
/// let buffer = AudioBufferBox::<f32, 1>::zeroed(64);
/// use valib_core::dsp::buffer::{AudioBuffer, AudioBufferBox};
/// let buffer = AudioBuffer::const_new([[0f32; 64]; 2]);
/// let slice = buffer.array_slice(16..32);
/// ```
pub fn array_slice(&self, bounds: impl RangeBounds<usize>) -> AudioBufferRef<T, CHANNELS> {
Expand All @@ -137,8 +137,8 @@ impl<T, const LENGTH: usize, const CHANNELS: usize> AudioBuffer<[T; LENGTH], CHA
/// # Examples
///
/// ```
/// use valib_core::dsp::buffer::AudioBufferBox;
/// let mut buffer = AudioBufferBox::<f32, 1>::zeroed(64);
/// use valib_core::dsp::buffer::{AudioBuffer, AudioBufferBox};
/// let mut buffer = AudioBuffer::const_new([[0f32; 64]; 2]);
/// let mut slice = buffer.array_slice_mut(16..32);
/// ```
pub fn array_slice_mut(
Expand Down Expand Up @@ -258,7 +258,7 @@ impl<T, C: Deref<Target = [T]>, const CHANNELS: usize> AudioBuffer<C, CHANNELS>
/// ```
/// use valib_core::dsp::buffer::AudioBufferBox;
/// let buffer = AudioBufferBox::<f32, 1>::zeroed(64);
/// let slice = buffer.array_slice(16..32);
/// let slice = buffer.slice(16..32);
/// ```
pub fn slice(&self, bounds: impl RangeBounds<usize>) -> AudioBufferRef<T, CHANNELS> {
let range = bounds_into_range(bounds, 0..self.inner_size);
Expand Down Expand Up @@ -350,7 +350,7 @@ impl<T, C: DerefMut<Target = [T]>, const CHANNELS: usize> AudioBuffer<C, CHANNEL
/// ```
/// use valib_core::dsp::buffer::AudioBufferBox;
/// let mut buffer = AudioBufferBox::<f32, 1>::zeroed(64);
/// let mut slice = buffer.array_slice_mut(16..32);
/// let mut slice = buffer.slice_mut(16..32);
/// ```
pub fn slice_mut(&mut self, bounds: impl RangeBounds<usize>) -> AudioBufferMut<T, CHANNELS> {
let range = bounds_into_range(bounds, 0..self.inner_size);
Expand Down
Loading

0 comments on commit f8e81ca

Please sign in to comment.