pub struct Samples<T: Sample> {
pub samples: Vec<T>,
pub metadata: SamplesMetadata,
}Expand description
A sample container of LPcm samples ready to be send to audio streams
Fields§
§samples: Vec<T>A an ordered vector of all the samples, if there are multiple channels, each channel will have their own sample
ex: 1 channel: [s1, s2, s3]
2 channels: [s-left1, s-right1, s-left-2, s-right-2, s-left-3, s-right-3]
metadata: SamplesMetadataThe metadata of the Samples, dictates how they are consumed and modified. There is no guarenty that the metadata reflects the actual intended metadata.
Implementations§
Source§impl Samples<IntermediateSampleType>
impl Samples<IntermediateSampleType>
Sourcepub fn into_t_samples<T: Sample + FromSample<IntermediateSampleType>>(
self,
) -> Samples<T>
pub fn into_t_samples<T: Sample + FromSample<IntermediateSampleType>>( self, ) -> Samples<T>
Turns the samples into the desired sample type, does not clone
Trait Implementations§
Source§impl<T: Sample> SamplesTrait for Samples<T>where
IntermediateSampleType: FromSample<T>,
impl<T: Sample> SamplesTrait for Samples<T>where
IntermediateSampleType: FromSample<T>,
Source§fn into_generic_representation_samples(self) -> Samples<IntermediateSampleType>
fn into_generic_representation_samples(self) -> Samples<IntermediateSampleType>
Transforms the samples into
IntermediateSampleType, does not cloneSource§fn generic_representation_samples(&self) -> Samples<IntermediateSampleType>
fn generic_representation_samples(&self) -> Samples<IntermediateSampleType>
Makes a clone of the samples in the
IntermediateSampleTypeSource§fn metadata(&self) -> Box<dyn AudioMetadataTrait>
fn metadata(&self) -> Box<dyn AudioMetadataTrait>
Gets the metadata of the samples
Auto Trait Implementations§
impl<T> Freeze for Samples<T>
impl<T> RefUnwindSafe for Samples<T>where
T: RefUnwindSafe,
impl<T> Send for Samples<T>
impl<T> Sync for Samples<T>where
T: Sync,
impl<T> Unpin for Samples<T>where
T: Unpin,
impl<T> UnwindSafe for Samples<T>where
T: UnwindSafe,
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