Enum awedio::NextSample
source · pub enum NextSample {
Sample(i16),
MetadataChanged,
Paused,
Finished,
}
Expand description
The result of Sound::next_sample
Variants§
Sample(i16)
A sample for one channel. Channels are interleaved. The first sample is for the first channel and so forth and repeats (e.g. L-R-L-R-L-R).
MetadataChanged
The number of channels or the sample rate has changed. Continue to retrieve samples afterward. The next sample will always be for the first track regardless of what track was next
Paused
No more samples for now. More might come later. It is expected that the Sound will not be pulled again during this batch of samples.
Finished
All samples have been retrieved and no more will come.
Trait Implementations§
source§impl Clone for NextSample
impl Clone for NextSample
source§fn clone(&self) -> NextSample
fn clone(&self) -> NextSample
Returns a copy 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 moresource§impl Debug for NextSample
impl Debug for NextSample
source§impl Ord for NextSample
impl Ord for NextSample
source§fn cmp(&self, other: &NextSample) -> Ordering
fn cmp(&self, other: &NextSample) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for NextSample
impl PartialEq for NextSample
source§fn eq(&self, other: &NextSample) -> bool
fn eq(&self, other: &NextSample) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for NextSample
impl PartialOrd for NextSample
source§fn partial_cmp(&self, other: &NextSample) -> Option<Ordering>
fn partial_cmp(&self, other: &NextSample) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for NextSample
impl Eq for NextSample
impl StructuralPartialEq for NextSample
Auto Trait Implementations§
impl Freeze for NextSample
impl RefUnwindSafe for NextSample
impl Send for NextSample
impl Sync for NextSample
impl Unpin for NextSample
impl UnwindSafe for NextSample
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