#[non_exhaustive]pub struct Params {
pub volume: u16,
pub looped: bool,
pub rate: u32,
pub balance: (u16, u16),
pub region: Option<Region>,
}Expand description
How a voice starts.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.volume: u16In 1/4096. Over UNITY it amplifies.
looped: boolStarts over at its end. A region loops whether or not this is set.
rate: u32§balance: (u16, u16)The left and right gains, in 1/4096. A mono output plays their mean.
region: Option<Region>What it loops, after playing what comes before once.
Implementations§
Source§impl Params
impl Params
Sourcepub const fn with_volume(self, volume: u16) -> Self
pub const fn with_volume(self, volume: u16) -> Self
At volume, in 1/4096.
Sourcepub const fn with_balance(self, left: u16, right: u16) -> Self
pub const fn with_balance(self, left: u16, right: u16) -> Self
With these gains, in 1/4096.
Sourcepub const fn with_region(self, region: Region) -> Self
pub const fn with_region(self, region: Region) -> Self
Looping region.
Trait Implementations§
impl Copy for Params
impl Eq for Params
impl StructuralPartialEq for Params
Auto Trait Implementations§
impl Freeze for Params
impl RefUnwindSafe for Params
impl Send for Params
impl Sync for Params
impl Unpin for Params
impl UnsafeUnpin for Params
impl UnwindSafe for Params
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