Expand description
For working with slices of PCM audio data.
Items related to conversion between slices of frames and slices of samples, particularly useful for working with interleaved data.
§Optional Features
- The boxed feature (or slice-boxed feature if using
dasp
) provides a suite of boxed slice conversion traits and functions under the boxed module.
§no_std
If working in a no_std
context, you can disable the default std feature with
--no-default-features
.
Re-exports§
pub use boxed::from_boxed_frame_slice;
pub use boxed::from_boxed_sample_slice;
pub use boxed::to_boxed_frame_slice;
pub use boxed::to_boxed_sample_slice;
pub use boxed::DuplexBoxedFrameSlice;
pub use boxed::DuplexBoxedSampleSlice;
pub use boxed::DuplexBoxedSlice;
pub use boxed::FromBoxedFrameSlice;
pub use boxed::FromBoxedSampleSlice;
pub use boxed::ToBoxedFrameSlice;
pub use boxed::ToBoxedSampleSlice;
Modules§
- boxed
- Items related to boxed-slice conversions.
Traits§
- Duplex
Frame Slice - For converting to and from a slice of
Frame
s. - Duplex
Frame Slice Mut - For converting to and from a mutable slice of
Frame
s. - Duplex
Sample Slice - For converting to and from a slice of
Sample
s. - Duplex
Sample Slice Mut - For converting to and from a mutable slice of
Sample
s. - Duplex
Slice - For converting to and from a slice of
Sample
s of typeS
and a slice ofFrame
s of typeF
. - Duplex
Slice Mut - For converting to and from a mutable slice of
Sample
s of typeS
and a slice ofFrame
s of typeF
. - From
Frame Slice - For converting from a slice of
Frame
s to a slice ofSample
s. - From
Frame Slice Mut - For converting from a slice of
Frame
s to a slice ofSample
s. - From
Sample Slice - For converting from a slice of
Sample
s to a slice ofFrame
s. - From
Sample Slice Mut - For converting from a mutable slice of
Sample
s to a mutable slice ofFrame
s. - ToFrame
Slice - For converting from a slice of
Sample
s to a slice ofFrame
s. - ToFrame
Slice Mut - For converting from a mutable slice of
Sample
s to a mutable slice ofFrame
s. - ToSample
Slice - For converting from a slice of
Frame
s to a slice ofSample
s. - ToSample
Slice Mut - For converting from a mutable slice of
Frame
s to a mutable slice ofSample
s.
Functions§
- add_
in_ place - Adds every sample in slice
b
to every sample in slicea
respectively. - add_
in_ place_ with_ amp_ per_ channel - Scale the amplitude of each frame in
b
byamp_per_channel
before summing it ontoa
. - equilibrium
- Sets the slice of frames at the associated
Sample
’s equilibrium value. - from_
frame_ slice - Converts the given slice of
Frame
s into some sliceT
. - from_
frame_ slice_ mut - Converts the given slice of mutable
Frame
s into some mutable sliceT
. - from_
sample_ slice - Converts the given slice of
Sample
s into some sliceT
. - from_
sample_ slice_ mut - Converts the given mutable slice of
Sample
s into some mutable sliceT
. - map_
in_ place - Mutate every element in the slice with the given function.
- to_
frame_ slice - Converts the given slice into a slice of
Frame
s. - to_
frame_ slice_ mut - Converts the given mutable slice into a mutable slice of
Frame
s. - to_
sample_ slice - Converts the given slice into a slice of
Sample
s. - to_
sample_ slice_ mut - Converts the given mutable slice of
Frame
s into a mutable slice ofSample
s. - write
- Writes every sample in slice
b
to slicea
. - zip_
map_ in_ place - Mutate every frame in slice
a
while reading from each frame in sliceb
in lock-step using the given function.