Struct symphonia_core::audio::SampleBuffer [−][src]
A SampleBuffer
, is a sample oriented buffer. It is agnostic to the ordering/layout of samples
within the buffer. SampleBuffer
is mean’t for safely importing and exporting sample data to
and from Symphonia using the sample’s in-memory data-type.
Implementations
impl<S: Sample> SampleBuffer<S>
[src]
pub fn new(duration: Duration, spec: SignalSpec) -> SampleBuffer<S>
[src]
Instantiate a new SampleBuffer
using the specified signal specification and of the given
duration.
pub fn len(&self) -> usize
[src]
Gets the number of written samples.
pub fn samples(&self) -> &[S]
[src]
Gets an immutable slice of all written samples.
pub fn capacity(&self) -> usize
[src]
Gets the maximum number of samples the SampleBuffer
may store.
pub fn copy_planar_ref(&mut self, src: AudioBufferRef<'_>) where
S: ConvertibleSample,
[src]
S: ConvertibleSample,
Copies all audio data from the source AudioBufferRef
in planar channel order into the
SampleBuffer
. The two buffers must be equivalent.
pub fn copy_planar_typed<F>(&mut self, src: &AudioBuffer<F>) where
F: Sample + IntoSample<S>,
[src]
F: Sample + IntoSample<S>,
Copies all audio data from a source AudioBuffer
into the SampleBuffer
in planar
channel order. The two buffers must be equivalent.
pub fn copy_interleaved_ref(&mut self, src: AudioBufferRef<'_>) where
S: ConvertibleSample,
[src]
S: ConvertibleSample,
Copies all audio data from the source AudioBufferRef
in interleaved channel order into the
SampleBuffer
. The two buffers must be equivalent.
pub fn copy_interleaved_typed<F>(&mut self, src: &AudioBuffer<F>) where
F: Sample + IntoSample<S>,
[src]
F: Sample + IntoSample<S>,
Copies all audio samples from a source AudioBuffer
into the SampleBuffer
in interleaved
channel order. The two buffers must be equivalent.
Auto Trait Implementations
impl<S> RefUnwindSafe for SampleBuffer<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for SampleBuffer<S> where
S: Send,
S: Send,
impl<S> Sync for SampleBuffer<S> where
S: Sync,
S: Sync,
impl<S> Unpin for SampleBuffer<S> where
S: Unpin,
S: Unpin,
impl<S> UnwindSafe for SampleBuffer<S> where
S: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<F, T> IntoSample<T> for F where
T: FromSample<F>,
[src]
T: FromSample<F>,
pub fn into_sample(Self) -> T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,