pub struct AudioFrames { /* private fields */ }Expand description
The decoded audio of a player, in the order it decodes.
Returned by Player::audio_frames. Each
handle reads every frame decoded after it was created. A handle that falls
more than a second behind loses the oldest frames, so the decoder never
waits for a reader.
Implementations§
Source§impl AudioFrames
impl AudioFrames
Sourcepub async fn next(&mut self) -> Option<AudioFrame>
pub async fn next(&mut self) -> Option<AudioFrame>
Waits for the next decoded frame.
Frames decoded before the player was dropped are still returned, up to
the backlog a handle keeps. Returns None once the player is dropped
and this handle has read them. Cancellation safe.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AudioFrames
impl !UnwindSafe for AudioFrames
impl Freeze for AudioFrames
impl Send for AudioFrames
impl Sync for AudioFrames
impl Unpin for AudioFrames
impl UnsafeUnpin for AudioFrames
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