#[non_exhaustive]pub enum AudioSource {
Path(String),
EncodedBytes(Arc<[u8]>),
PcmS16 {
sample_rate: u32,
channels: u8,
samples: Arc<[i16]>,
},
PcmF32 {
sample_rate: u32,
channels: u8,
samples: Arc<[f32]>,
},
Generator(Generator),
}Expand description
Audio content source.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Path(String)
EncodedBytes(Arc<[u8]>)
PcmS16
Pre-decoded PCM — interleaved S16.
PcmF32
Pre-decoded PCM — interleaved F32.
Generator(Generator)
Generator — sine / noise / silence. Useful for placeholder beds and quick tests.
Trait Implementations§
Source§impl Clone for AudioSource
impl Clone for AudioSource
Source§fn clone(&self) -> AudioSource
fn clone(&self) -> AudioSource
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 AudioSource
impl RefUnwindSafe for AudioSource
impl Send for AudioSource
impl Sync for AudioSource
impl Unpin for AudioSource
impl UnsafeUnpin for AudioSource
impl UnwindSafe for AudioSource
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