[][src]Crate dasp_slice

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

DuplexFrameSlice

For converting to and from a slice of Frames.

DuplexFrameSliceMut

For converting to and from a mutable slice of Frames.

DuplexSampleSlice

For converting to and from a slice of Samples.

DuplexSampleSliceMut

For converting to and from a mutable slice of Samples.

DuplexSlice

For converting to and from a slice of Samples of type S and a slice of Frames of type F.

DuplexSliceMut

For converting to and from a mutable slice of Samples of type S and a slice of Frames of type F.

FromFrameSlice

For converting from a slice of Frames to a slice of Samples.

FromFrameSliceMut

For converting from a slice of Frames to a slice of Samples.

FromSampleSlice

For converting from a slice of Samples to a slice of Frames.

FromSampleSliceMut

For converting from a mutable slice of Samples to a mutable slice of Frames.

ToFrameSlice

For converting from a slice of Samples to a slice of Frames.

ToFrameSliceMut

For converting from a mutable slice of Samples to a mutable slice of Frames.

ToSampleSlice

For converting from a slice of Frames to a slice of Samples.

ToSampleSliceMut

For converting from a mutable slice of Frames to a mutable slice of Samples.

Functions

add_in_place

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

add_in_place_with_amp_per_channel

Scale the amplitude of each frame in b by amp_per_channel before summing it onto a.

equilibrium

Sets the slice of frames at the associated Sample's equilibrium value.

from_frame_slice

Converts the given slice of Frames into some slice T.

from_frame_slice_mut

Converts the given slice of mutable Frames into some mutable slice T.

from_sample_slice

Converts the given slice of Samples into some slice T.

from_sample_slice_mut

Converts the given mutable slice of Samples into some mutable slice T.

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 of Samples.

write

Writes every sample in slice b to slice a.

zip_map_in_place

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