Struct rich_sdl2_rust::audio::queue::QueuedAudio
source · pub struct QueuedAudio<'device> { /* private fields */ }
Expand description
A queue to push data to play the sound with SpeakerDevice
.
Implementations§
source§impl<'device> QueuedAudio<'device>
impl<'device> QueuedAudio<'device>
sourcepub fn new(device: &'device mut SpeakerDevice) -> Self
pub fn new(device: &'device mut SpeakerDevice) -> Self
Constructs a queue from a SpeakerDevice
.
sourcepub fn clear(&self)
pub fn clear(&self)
Clears all audio data in the queue to stop to play, but it does not stop immediately because of drivers’ implementation.
sourcepub fn queue_bytes_size(&self) -> usize
pub fn queue_bytes_size(&self) -> usize
Returns the size of the queue in bytes.
Trait Implementations§
source§impl<'device> Debug for QueuedAudio<'device>
impl<'device> Debug for QueuedAudio<'device>
Auto Trait Implementations§
impl<'device> !RefUnwindSafe for QueuedAudio<'device>
impl<'device> Send for QueuedAudio<'device>
impl<'device> !Sync for QueuedAudio<'device>
impl<'device> Unpin for QueuedAudio<'device>
impl<'device> !UnwindSafe for QueuedAudio<'device>
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