#[non_exhaustive]pub enum Policy {
RoundRobin,
FirstFree,
Smart,
StrictRetail,
}Expand description
How the voices in a lane are shared out.
§Example
use psx_sfx::mixer::{Lane, Policy};
let lane = Lane::new(0x00_00F0, Policy::FirstFree);
assert_eq!(lane.policy(), Policy::FirstFree);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
RoundRobin
Take the next voice in the lane after the last one used, whether it is idle or not. Cheap; a new sound cuts the oldest. Protected sounds are skipped.
FirstFree
Take the lowest free voice; with none free, drop the new sound. Never steals, so it suits lanes of loops that something else supervises.
Smart
The default for new code: a free voice, else one that is finishing or
ringing, else the least important live sound, else drop. See
Mixer::play for the exact order.
StrictRetail
Allocation exactly as WipEout’s retail sound driver makes it: the first idle voice in the lane, else the first finite sound with a strictly lower priority (a larger number); loops are never taken and an equal priority cannot steal. Expiry ends a sound at once with no release tail, and the playing sound is keyed off without being silenced first.
Trait Implementations§
impl Copy for Policy
impl Eq for Policy
impl StructuralPartialEq for Policy
Auto Trait Implementations§
impl Freeze for Policy
impl RefUnwindSafe for Policy
impl Send for Policy
impl Sync for Policy
impl Unpin for Policy
impl UnsafeUnpin for Policy
impl UnwindSafe for Policy
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)