Skip to main content

fill_buffers_deinterleaved_bytes

Function fill_buffers_deinterleaved_bytes 

Source
pub fn fill_buffers_deinterleaved_bytes<T: BytesSample, V: AsRef<[u8]>>(
    output_buffer: &mut [&mut [f32]],
    output_buffer_range: Range<usize>,
    start_frame_in_resource: u64,
    resource_frames: usize,
    resource_channels: &[V],
) -> usize
Expand description

A helper for SampleResource::fill_buffers_f32() to fill buffers from a resource of de-interleaved samples stored as raw bytes.

Returns the number of frames (samples in a single channel of audio) that were successfully written to the buffer. This may be less than the requested number of frames if output_buffer_range falls outside the range of the sample resource.

ยงPanics

Panics if:

  • output_buffer_range is out-of-bounds for any channel slice in output_buffer
  • The length of a channel slice in resource_channels is less than resource_frames