pub struct SampleBuffer { /* private fields */ }Implementations§
Source§impl SampleBuffer
impl SampleBuffer
pub fn new(data: Arc<Vec<f32>>, channels: usize, sample_rate: u32) -> Self
pub fn frames(&self) -> usize
pub fn channels(&self) -> usize
pub fn sample_rate(&self) -> u32
pub fn sample_channel( &self, frame: usize, channel: usize, target_channels: usize, ) -> f32
Sourcepub fn with_modified_data(
&self,
new_data: Vec<f32>,
new_channels: Option<usize>,
) -> Self
pub fn with_modified_data( &self, new_data: Vec<f32>, new_channels: Option<usize>, ) -> Self
Create a new SampleBuffer with modified data (for effects processing)
Sourcepub fn data_clone(&self) -> Vec<f32>
pub fn data_clone(&self) -> Vec<f32>
Get a mutable copy of the internal data for processing
Trait Implementations§
Source§impl Clone for SampleBuffer
impl Clone for SampleBuffer
Source§fn clone(&self) -> SampleBuffer
fn clone(&self) -> SampleBuffer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SampleBuffer
impl RefUnwindSafe for SampleBuffer
impl Send for SampleBuffer
impl Sync for SampleBuffer
impl Unpin for SampleBuffer
impl UnwindSafe for SampleBuffer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more