pub enum BufferOutOfSpaceMode {
AllocateOnAudioThread,
Panic,
DropEvents,
}Expand description
How to handle event buffers on the audio thread running out of space.
Variants§
AllocateOnAudioThread
If an event buffer on the audio thread ran out of space to fit new events, reallocate on the audio thread to fit the new items. If this happens, it may cause underruns (audio glitches), and a warning will be logged.
Panic
If an event buffer on the audio thread ran out of space to fit new events, then panic.
DropEvents
If an event buffer on the audio thread ran out of space to fit new events, drop those events to avoid allocating on the audio thread. If this happens, a warning will be logged.
(Not generally recommended, but the option is here if you want it.)
Trait Implementations§
Source§impl Clone for BufferOutOfSpaceMode
impl Clone for BufferOutOfSpaceMode
Source§fn clone(&self) -> BufferOutOfSpaceMode
fn clone(&self) -> BufferOutOfSpaceMode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BufferOutOfSpaceMode
impl Debug for BufferOutOfSpaceMode
Source§impl Default for BufferOutOfSpaceMode
impl Default for BufferOutOfSpaceMode
Source§fn default() -> BufferOutOfSpaceMode
fn default() -> BufferOutOfSpaceMode
Returns the “default value” for a type. Read more
Source§impl PartialEq for BufferOutOfSpaceMode
impl PartialEq for BufferOutOfSpaceMode
Source§impl PartialOrd for BufferOutOfSpaceMode
impl PartialOrd for BufferOutOfSpaceMode
impl Copy for BufferOutOfSpaceMode
impl StructuralPartialEq for BufferOutOfSpaceMode
Auto Trait Implementations§
impl Freeze for BufferOutOfSpaceMode
impl RefUnwindSafe for BufferOutOfSpaceMode
impl Send for BufferOutOfSpaceMode
impl Sync for BufferOutOfSpaceMode
impl Unpin for BufferOutOfSpaceMode
impl UnwindSafe for BufferOutOfSpaceMode
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