Function rubato::resize_buffer

source ·
pub fn resize_buffer<T: Sample>(buffer: &mut [Vec<T>], frames: usize)
Expand description

Convenience method for resizing a buffer to a new number of frames. If the new number of frames is no larger than the buffer capacity, no reallocation will occur. If the new length is smaller than the current, the excess elements are dropped. If it is larger, zeros are inserted for the missing elements.