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
Frames. - Duplex
Frame Slice Mut - For converting to and from a mutable slice of
Frames. - Duplex
Sample Slice - For converting to and from a slice of
Samples. - Duplex
Sample Slice Mut - For converting to and from a mutable slice of
Samples. - Duplex
Slice - For converting to and from a slice of
Samples of typeSand a slice ofFrames of typeF. - Duplex
Slice Mut - For converting to and from a mutable slice of
Samples of typeSand a slice ofFrames of typeF. - From
Frame Slice - For converting from a slice of
Frames to a slice ofSamples. - From
Frame Slice Mut - For converting from a slice of
Frames to a slice ofSamples. - From
Sample Slice - For converting from a slice of
Samples to a slice ofFrames. - From
Sample Slice Mut - For converting from a mutable slice of
Samples to a mutable slice ofFrames. - ToFrame
Slice - For converting from a slice of
Samples to a slice ofFrames. - ToFrame
Slice Mut - For converting from a mutable slice of
Samples to a mutable slice ofFrames. - ToSample
Slice - For converting from a slice of
Frames to a slice ofSamples. - ToSample
Slice Mut - For converting from a mutable slice of
Frames to a mutable slice ofSamples.
Functions§
- add_
in_ place - Adds every sample in slice
bto every sample in slicearespectively. - add_
in_ place_ with_ amp_ per_ channel - Scale the amplitude of each frame in
bbyamp_per_channelbefore summing it ontoa. - equilibrium
- Sets the slice of frames at the associated
Sample’s equilibrium value. - from_
frame_ slice - Converts the given slice of
Frames into some sliceT. - from_
frame_ slice_ mut - Converts the given slice of mutable
Frames into some mutable sliceT. - from_
sample_ slice - Converts the given slice of
Samples into some sliceT. - from_
sample_ slice_ mut - Converts the given mutable slice of
Samples 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
Frames. - to_
frame_ slice_ mut - Converts the given mutable slice into a mutable slice of
Frames. - to_
sample_ slice - Converts the given slice into a slice of
Samples. - to_
sample_ slice_ mut - Converts the given mutable slice of
Frames into a mutable slice ofSamples. - write
- Writes every sample in slice
bto slicea. - zip_
map_ in_ place - Mutate every frame in slice
awhile reading from each frame in slicebin lock-step using the given function.