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§impl PartialOrd for NextSample
impl PartialOrd for NextSample
impl 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)