pub struct Output { /* private fields */ }Expand description
The stream’s samples to their sink.
Implementations§
Source§impl Output
impl Output
Sourcepub fn open(sink: &Sink, channels: u16, rate: u32) -> Result<Self>
pub fn open(sink: &Sink, channels: u16, rate: u32) -> Result<Self>
Opens sink for channels channels at rate hertz.
Sourcepub fn write(&self, samples: &[f32], presented: Option<Presented>)
pub fn write(&self, samples: &[f32], presented: Option<Presented>)
Takes interleaved frames, and when they are due where the stream says.
Sourcepub fn playout(&self) -> Option<(i64, i64)>
pub fn playout(&self) -> Option<(i64, i64)>
How long after its presentation time each sample plays, once the output knows, and how far from that the last chunk played, in nanoseconds.
Auto Trait Implementations§
impl !Freeze for Output
impl !RefUnwindSafe for Output
impl !UnwindSafe for Output
impl Forget for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnsafeUnpin for Output
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