pub struct Stream<T> { /* private fields */ }
Expand description
Dynamic audio from an external source
Implementations§
source§impl<T> Stream<T>
impl<T> Stream<T>
sourcepub fn new(rate: u32, size: usize) -> (StreamControl<T>, Self)
pub fn new(rate: u32, size: usize) -> (StreamControl<T>, Self)
Construct a stream of dynamic audio
Samples can be appended to the stream through its StreamControl
. This allows the
business of obtaining streaming audio, e.g. from a streaming decoder or the network, to take
place without interfering with the low-latency requirements of audio output.
rate
is the stream’s sample ratesize
dictates the maximum number of buffered frames
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Stream<T>
impl<T> Send for Stream<T>where
T: Send,
impl<T> Sync for Stream<T>where
T: Send,
impl<T> Unpin for Stream<T>
impl<T> !UnwindSafe for Stream<T>
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