#[non_exhaustive]pub enum Source {
Silence,
Tone {
hertz: f32,
level: f32,
},
Device {
name: Option<String>,
first_channel: u16,
},
Shared(SharedBuffer),
Blocks(Blocks<dyn BlockSource>),
}Expand description
Where a talker’s samples come from.
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.
Silence
Tone
A sine on every channel, its level from 0 to 1.
Device
An audio input, by name or the default one, the stream’s channels
taken from its channel first_channel on.
A buffer another part of the program fills as a device would, such as a virtual audio device apps play into.
Blocks(Blocks<dyn BlockSource>)
Another part of the program, block by block on the talker’s thread, in the stream’s own format and on its timeline: nothing buffered or resampled between.
Trait Implementations§
impl StructuralPartialEq for Source
Auto Trait Implementations§
impl !RefUnwindSafe for Source
impl !UnwindSafe for Source
impl Forget for Source
impl Freeze for Source
impl Move for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnsafeUnpin for Source
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