Module dsp::sample::buffer []

This module provides various helper functions for performing operations on slices of samples.

Functions

add

Adds every sample in buffer b to every sample in buffer a respectively.

add_with_amp_per_channel

Sum buffer b onto buffer a after multiplying it by the amplitude per channel.

equilibrium

Sets the buffer of samples at the Sample's equilibrium value.

map_in_place

Mutate every element in the buffer with the given function.

map_in_place_with

Mutate every element in buffer a while reading from each element from buffer b in lock-step using the given function.

write

Writes every sample in buffer b to buffer a.