Module nih_plug::buffer

source ·
Expand description

Adapters and utilities for working with audio buffers.

Structs

  • A block yielded by BlocksIter. Can be iterated over once or multiple times, and also supports direct access to the block’s samples if needed.
  • An iterator over all channels in a block yielded by Block, returning an entire channel slice at a time.
  • An iterator over all samples in the buffer, slicing over the sample-dimension with a maximum size of max_block_size. See Buffer::iter_blocks(). Yields both the block and the offset from the start of the buffer.
  • The audio buffers used during processing. This contains the output audio output buffers with the inputs already copied to the outputs. You can either use the iterator adapters to conveniently and efficiently iterate over the samples, or you can do your own thing using the raw audio buffers.
  • Can construct iterators over actual iterator over the channel data for a sample, yielded by SamplesIter. Can be turned into an iterator, or ChannelSamples::iter_mut() can be used to iterate over the channel data multiple times, or more efficiently you can use ChannelSamples::get_unchecked_mut() to do the same thing.
  • The actual iterator over the channel data for a sample, yielded by ChannelSamples.
  • An iterator over all samples in a buffer or block, yielding iterators over each channel for every sample. This iteration order offers good cache locality for per-sample access.